A Long Island woman has admitted she was hooked on heroin when she raised thousands of dollars by falsely claiming she had cancer, prosecutors and her attorney said Wednesday.

Brittany Ozarowski befriended business owners and others in her community, telling them a tale about undergoing cancer treatments, prosecutors said. Because she was a heroin addict, no one seemed to question her 80-pound appearance as she hobbled on a cane going from store to store leaving donation jars, they said.

Ozarowski pleaded guilty on Monday in Suffolk County Court to a 24-count indictment charging her with grand larceny, forgery and other crimes, district attorney’s office spokesman Robert Clifford said.

Although Ozarowski could have faced a sentence of up to seven years in prison, Judge John Iliou said he would sentence the 21-year-old to a drug treatment program for up to two years plus an additional year’s probation. Ozarowski, who’s from Miller Place, 60 miles east of New York City, also will be required to pay more than $10,000 in restitution.

Her attorney, George Duncan, said it’s “an appropriate sentence given the nature of her offenses, which were morally reprehensible.”

“Her acceptance into a judicial diversion program is exactly what she needs,” Duncan said.

Duncan added that Ozarowski, who was arrested in April, is no longer using heroin and “looks like a totally different person. She’s terribly remorseful. She’s horrified and embarrassed.”

Ozarowski’s next court date is Monday, but Duncan said it was doubtful the sentence would be imposed that day.

Clifford said the district attorney’s office believes incarceration for up to seven years would be “a fair and just disposition” in Ozarowski’s case considering “the scope of her crime, the number of people she deceived and the repeated, willful deception she engaged in.”

Prosecutors said Ozarowski began befriending business owners and other people in her community in March 2012 and telling them about fighting cancer. Some business owners were so taken by her plight that they organized community fundraisers for her benefit.

There is no way of knowing how much money Ozarowski pocketed in the scam because so many of the donations were in cash, prosecutors said.

Ozarowski’s story began to unravel as volunteers became more interested in her plight. When one man offered to arrange treatments for her through a neurologist at Stony Brook Medical Center, she was a no-show. When others questioned why she had not lost her hair to chemotherapy, she told them she was taking special vitamins.

Eventually, suspicious donors went to the authorities and she was arrested.

Prosecutors said Ozarowski has a history of drug arrests dating to 2010. The forgery charges in the indictment were linked to doctor’s notes written to seek postponement of court dates from four prior arrests.