After sobbing for hours and begging the judge to show leniency on behalf of her three young children, Kristie Masucci, a former pharmaceutical representative who helped concoct a vast prescription-drug fraud scheme using public employees with state health benefits, was sentenced Tuesday to 24 months in federal prison.

“I’m ashamed and embarrassed,” Masucci told U.S. District Judge Robert B. Kugler in Camden before being sentenced. “This has left me feeling completely broken.”

She is the first to be sentenced out of 21 people who have pleaded guilty to health-care fraud in a $50 million conspiracy that allegedly involved hundreds of Shore teachers, firefighters, police officers, and others with state health plans who submitted fraudulent claims for expensive compounded medicines.

She must make restitution of $1.8 million and forfeit $338,000 to compensate for what she personally earned. She will serve three years of supervised release after the prison sentence, the judge said.

“Let’s remember, we’re talking about vitamins,” Kugler said as the five-hour hearing came to a close, rejecting pleas to sentence Masucci to home confinement. “We’re talking about ointments. These are things that had minimal-at-best medical value. What the products had was financial value.

“The whole thing is tragic,” Kugler said. “People’s families get destroyed. There is more than one victim in this case. Her children are also victims. But that’s her doing.”

Prosecutors said that from January 2015 through February 2016, Masucci, 37, of Cedar Run, Ocean County, was “in the middle of a vast conspiracy” that defrauded the State of New Jersey of about $50 million paid in reimbursements to public employees.

In addition, several others, including alleged ringleaders William and Sara Hickman of Northfield, N.J., were indicted this year and have pleaded not guilty.

Masucci was described in court as a recruiter who established her own sales force, set up a separate bank account — the “KLM” account — paid taxes on about $388,000 in commissions she received as part of the scheme, and used the rest of the money to buy an empty lot next to her home, build a new house, and buy a boat.

“She was in on it from the start,” said Assistant U.S. Attorney R. David Walk Jr. “She helped [another alleged ringleader, Matthew] Tedesco to develop the scheme. And she knew it was fraudulent.

“She went out and constructed a sales force of people,” Walk said. He said she received about 25% in commission on the prescription drugs for the compounded medicines, some of which were reimbursed for as much as $19,000 by the state health benefit plan.

“Her conduct lasted a long time,” Walk said. “It was pervasive.”

He noted that Masucci worked directly with both Tedesco and John Gaffney, a Margate physician who signed numerous fraudulent prescriptions and has also pleaded guilty. She and her husband began by submitting 55 prescriptions for themselves that were signed by Gaffney. She then oversaw prescriptions that brought $1.8 million in reimbursements, Walk said.

Masucci’s attorney, Amy Luria, argued that about $700,000 of that total was reimbursements paid for prescriptions from people who obtained them after seeing their own physicians and presumably used the medicines legitimately. The judge considered deducting that amount from the total — giving Masucci the benefit of the doubt, he said, and possibly lessening her sentence — but declined to do so.

In pronouncing sentence, the judge cited a “need for general deterrence” of health-care fraud. He did deviate from a possible sentence of up to 46 months, citing her remorse and family considerations. She and her husband, Michael, said their middle son, 5, suffers from severe gastrointestinal disease and is considered fragile. They feared how the children would fare in their mother’s absence.

She described herself in court as someone who had never done anything wrong until this case: a good athlete, leader in her community, strong student, devoted mother. Her husband tearfully described her as “the anchor” of the family and himself as her “proud husband.”

“I stand before you in front of family and friends a broken man, and a shell of my former self,” he told the judge. “I love Kristie with all my heart.”

He said the couple, high school sweethearts, would “spend the rest of our lives righting this situation,” which he described as paralyzing. He pledged to be truthful to their children as they get older “so they will learn from our mistakes.”

“The situation has brought us to our knees spiritually and financially,” he said.

Kristie Masucci said her involvement in the scheme was a result of bad decisions, a desire to help her family regain its financial footing after losing their home in Hurricane Sandy.

“My conduct in this matter is frankly the complete opposite of who I am,” she said. “Worst of all, I have put my family in harm’s way.”

As the judge read the sentence, Michael Masucci covered his face with his hands in the second row of the courtroom as his wife and other relatives sobbed. The judge said she must report to a federal prison — the closest is in Danbury, Conn. — after Jan. 1, 2020, at a date to be determined.