BENNINGTON — A Shaftsbury man was sentenced to serve three to 15 years in jail Thursday after amassing 36 criminal charges, many of them felony counts of burglary, and pleading guilty to half of them.

Eric Lambert, 25, pleaded guilty in Bennington criminal court Thursday to 18 charges including six felony counts of burglary of an occupied home, four felony counts of possession of stolen property and two felony counts of grand larceny. The rest of the charges were dismissed as part of a plea agreement through which Lambert will serve at least three years in prison.

Charges against Lambert were first filed in March, and he was released from custody pending the outcome of the cases against him. In June, he was ordered held in prison after police learned he was continuing to steal including from a woman who agreed to take him in so he would have a place to stay while charges were pending.

Bennington County Deputy State’s Attorney Alexander Burke and T. Lamar Enzor, who represented Lambert, both told Judge Cortland Corsones that Lambert had never been in trouble with the law until a serious traffic crash, for which Lambert was prescribed pain medication, led to an addiction.

Burke said Lambert began stealing from family, then friends, then neighbors to support his drug addiction.

“If he had only one burglary, had stolen from family, the state would have viewed this situation much differently. Probation (and rehabilitation) would have been appropriate. ... However, his actions spanned a period of time. They caused violations of multiple victims and even when he was under court order and was facing a variety of burglary charges, he engaged in more burglaries,” he said.

Burke said the sentence recommended through agreement included “punishment but it also has the potential for rehabilitation.”

Most of the people who told police that Lambert had taken things from them knew Lambert before the burglaries.

Tracey Schwarz told the court that she thought about Lambert and what he had done every day.

“I wonder if he remembers meeting me in my driveway after he was in our house. Eric Lambert took precious jewelry from our home. Eric Lambert invaded our world. Eric Lambert changed the way we live,” she said.

Another victim said Lambert had taken things from her and her neighbors after she took him in. She said her small neighborhood in Shaftsbury had changed with people putting up cameras and lights and living in fear because of the burglaries.

Enzor said he had spoken to Lambert about his use of narcotics and how it could “only have a negative, difficult, troubling type of impact on the community.”

Before being sentenced, Lambert apologized to people he had “offended” and said he took responsibility for what he had done.

“I have truly turned my life around since I’ve been incarcerated at Marble Valley (the jail in Rutland). ... I’ve taken control of my problem and I would take a drug screening right now, this very day, to prove to everybody that I have,” he said.

Corsones said he agreed to the sentence in part because of the statements he had received from burglary victims. He said some of them were people who were 60 years old and only now believed they needed to lock their doors.