SALEM – A Billerica landscaper who admitted burglarizing two Lynnfield homes last winter to support his addiction received three years in state prison to be followed by two years of probation.Thomas Fisher, 27, of 20 Wilson St., pleaded guilty to two counts of breaking and entering with intent to commit a felony and a single count of larceny from a building before Judge John T. Lu in Salem Superior Court Wednesday.The charges arise out of two incidents last Jan. 7, when Fisher invaded two homes at 17 and 22 Upton Lane while a friend waited for him in a parked car.Police responded to the area at about 1:30 p.m., after one of the homeowners at 17 Upton Lane confronted Fisher in his home and chased him out.Police later arrested Fisher in Arlington, seizing his Reebok sneakers, which matched sneaker prints left at the scene.Assistant District Attorney Greg A. Friedholm said that Fisher was a “heavy drug user” and that the crime was fueled to obtain property for money to buy drugs as he asked the judge to impose the agreed punishment.Defense lawyer Christopher Norris said he felt the sentence is “appropriate” and that the victims in the case endorsed the penalty.Upon his release from prison, Fisher will undergo drug evaluation and treatment as deemed necessary, be subject to random screenings and was ordered to stay away from the Upton Lane homes and the homeowners.Lu warned Fisher that if he does not abide by all the conditions imposed he would be facing up to 10 years in state prison. Lu also retained jurisdiction over the case.The judge credited Fisher with 361 days he has spent in jail awaiting trial.