Golriz Ghahraman has been convicted on four counts of shoplifting, and fined $1600 and an additional $260 in court costs.
Judge June Jelas delivered her decision on the former Green MP's sentence to the Auckland District Court on Thursday.
Ghahraman appeared in court, seated in the public gallery, alongside a small number of friends and supporters.
The 43-year-old had previously pleaded guilty to four charges of shoplifting from stores in Auckland and Wellington in March.
Her lawyer, Annabel Cresswell, had argued at a hearing on Monday for a discharge without conviction, while the Crown prosecutor, Alysha McClintock, had asked for a sentence of imprisonment.
Judge Jelas told the court Ghahraman would not be discharged without conviction.
"On the 24th of June 2024, I heard Ms Ghahraman's application for no conviction to be entered against her name. That application is declined. I have determined that the statutory test for granting Ms Gharaman's application has not been met."
However, she said multiple factors, including Ghahraman's demonstrated regret for her offending and prior good character and her contribution to the community, meant a sentence of imprisonment would not be necessary.
"Ms Ghahraman has demonstrated her deep remorse for her offending, through her in person apology with the proprietor of Scotties Boutique store, before any of the charges were laid. Her remorse is also demonstrated by her early payment of full reparation to all of the three affected retail stores.
"Ms Ghahraman has been proactive in seeking to make amends for her offending."
She said Ghahraman had already made considerable contributions to the community through her work as a human rights lawyer, before her seven-year Parliamentary career.
Threats 'deeply disturbing' - judge
Judge Jelas said Ghahraman's complex experiences of trauma contributed to her decision not to impose a custodial sentence.
The defendant had experienced trauma as a refugee, vicariously as a lawyer working on war crimes, and as an MP.
"She has had traumatic experiences as a result of the regular and extreme abuse and threats to her wellbeing that have been directed towards her as a member of Parliament. Some examples of those threats have been provided to me, and I consider them to be deeply disturbing."
Judge Jelas said the fact that her security detail at Parliament, as a first-term MP, had to be upgraded to the same level of a prime minister, showed the seriousness of those threats.
She also noted that the media treatment Ghahraman received after the shoplifting was revealed, including three weeks of media staking out her house that Ghahraman's lawyer included in her submission, meant she remained inside her home, curtains drawn, for an extended period of time.
The judge likened this to court-imposed detention.
Judge Jelas ended the sentencing by saying she accepted Ghahraman's feelings of regret.
"I hope in time that Ms Ghahraman will be able to again utilise her many talents and many skills and positive attributes to the benefit of her community that, to date, she has tirelessly endeavoured to serve."
Green Party co-leaders Chlöe Swarbrick and Marama Davidson released a short statement after the sentencing saying: "We hope Golriz receives the support she needs and that she is able to recover and move forward from this experience."