Burglar Jonathan Aplin twice triggered an alarm at an off-licence - the second time when police were outside the shop.
When Aplin, 31, pleaded guilty to entering the shop in Regent Parade, Harrogate, Hugh Simpson, presiding at the town's magistrates' court, said his record justified a jail sentence, particularly as he had not complied with previous probation and community service orders.
Aplin, of South Beech Avenue, Harrogate, was put on probation for a year and warned: "If you don't go through with it, you will certainly go to prison.'' He was also ordered to pay £75 compensation, and £70 costs.
Michael Hammond, prosecuting, said police were alerted by the off-licence burglar alarm and found the place in darkness when they arrived. But a light went on to reveal Aplin trying to escape after the alarm went off a second time.
In mitigation, Geoffrey Rogers said Aplin had turned to binge drinking to try to rid himself of an amphetamine habit, but was now thinking seriously about his alcohol intake for the sake of his partner and their children
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article