This nun had a bad habit — and she’s landed in purgatory for it.

Sister Marie Thornton gambled her life away playing the one-armed bandits in Atlantic City, losing nearly $1 million she pilfered from the coffers of upstate Iona College, where she worked as a trusted financial officer.

Sister Susie, as she is known, was spared three years in federal prison by a compassionate Judge Kimba Wood in Manhattan Tuesday, after pleading guilty to one count of embezzlement.

But the 65-year-old nun has been sentenced to a lifetime of shame, shunned by Sisters of St. Joseph, the order she has served for 48 years. As an act of contrition, the lying nun spends her days and nights in solitary confinement in a small dorm-like room inside a Philadelphia convent.

She does not take her meals with the sisters, nor do her superiors allow her to work inside the Mother house doing small clerical jobs or even weeding the garden, according to court records and a source familiar with the case.

She is not allowed to leave the nunnery to visit relatives or friends or be seen in public at all. Her only escapes are trips to her therapist and group counseling.

“She can’t even go to the store and get milk,” the source said. “My belief is she will never be allowed to have contact with people again.”

The high-rolling sister holds a doctorate in education, served as an elementary-school principal and later as an assistant school superintendent for the Archdiocese of Newark, but there seems little chance the order will allow her to teach again, the source said.

For 10 years, until she was caught in 2009 for stealing $850,000 from Iona, Sister Susie would drive to the Jersey Shore on weekends, usually with an unsuspecting relative or friend, and spend the day there.

Although she didn’t have a favorite casino, her M.O. was the same: using the college corporate credit card for chips.

One weekend she blew $10,000 on the slots. Usually it was $2,000 to $5,000 a visit, the source said.

“She covered up the thousands she would lose by systematically submitting false vendor invoices for reimbursement to Iona College and submitting credit-card bills for personal expenses to be paid by Iona College,” according to US Attorney Preet Bharara.

In asking for 2,000 hours of community service instead of prison time, and three years of probation, defense attorney Sanford Talkin explained that her criminal behavior stemmed from horrific childhood abuse.

Her betting wasn’t about greed, he said. “When Sister Susie was gambling . . . she was able to stop the suffering internally. Gambling gave her a feeling of freedom, a feeling it’s about her for a change,” Talkin told the court. “You’re not dealing with somebody who is trying to buy a diamond necklace.”

In an act of mercy, Iona College, which received a $500,000 insurance payment for the theft, did not seek restitution from the nun.

Nuns take a vow of poverty, so the comfortable salary Sister Susie made as Iona’s vice president of finance — $180,000 a year — went to her religious order.

“I have labored over finding the right words because I want so desperately for you to know how sorry I am, but somehow the words . . . don’t touch or convey . . . the gut-wrenching sorry that I feel all day, every day,” Sister Susie told the court last week.

The sister, wearing a Celtic cross necklace, confessed that the past 2 1/2 years at the convent since her crime was uncovered “have been long, in isolation, in pain and in shame, and in humiliation that I can’t even begin to describe, but because I have suffered through it, I’m stronger, I’m better and I’m grateful.”