An Angus man who broke into a shop with the apparent intention of stealing so-called legal highs had been consuming the substances with friends before the offence.
Reece Walters from Arbroath broke into Evape-o-lution in Montrose High Street and stole a quantity of e-cigarettes from the front display.
The 20-year-old appeared from custody for sentencing at Forfar Sheriff Court and was given a one-year community payback order.
Defending Walters, solicitor Bob Bruce said his client had found prison “an eye-opener” as he waited for sentence.
Mr Bruce said: “He was consuming alcohol and legal highs with friends before the offence. His memory of the index offence is limited but he accepts the facts against him are true.”
Mr Bruce said his client had been diagnosed with Asperger Syndrome among other conditions, and medication was having a salutary effect.
Walters, of Sidlaw Avenue, was ordered to perform 40 hours of unpaid work within three months and will be under supervision for one year.
Previously, depute fiscal Hannah Kennedy told Sheriff Pino Di Emidio that the shop sold, among other things, legal highs.
Staff had secured the premises and, shortly before midnight, Walters was seen by a member of the public at the shop who reported him kicking at the glass door before walking away, only to return again, and kick the pane of glass until it broke.
Ms Kennedy said: “He entered the premises through the broken door and approached the cigarette kiosk and removed a quantity of e-cigarettes.
“Police officers, alerted by members of the public, were making their way to the locus and the accused was exiting through the same broken door as they arrived.”
Walters was arrested, cautioned and charged, having stolen £39-worth of the e-cigarettes.
He had also caused £139-worth of damage to the shop.
The accused, Mr Bruce said, recognised he had problems arising from his addiction to legal highs that required to be addressed.