A Kirkby youth shone the torch while two other teenagers broke into cars and stole items in the middle of the night, a court heard.
Dylan Slack, 18, of Coniston Road, admitted three counts of attempted theft and two of theft when he appeared before Mansfield magistrates, on Wednesday.
The court heard he and two other boys, who cannot be named for legal reasons, took Hugo Boss perfume and Dolce and Gabbana sunglasses, along with other items, from parked cars on Pinewood Close, Kirkby, just before 2am, on May 5.
A car alarm went off and three males were seen running from the area, but were arrested shortly afterwards, said Lee Shepherd, prosecuting.
More than £400 of damage was caused to the cars, the court heard.
Slack’s co-defendants were bailed to reappear before a youth court later in the year.
Slack had previous convictions for possession of an air weapon, public order offences and arson.
Sulma Mansuri, mitigating, said Slack suffered from serious mental health problems, following the death of his father.
On the night in question, “there had been name-calling and he feared that it would be put about that he was a bit of a wuss”, she said.
“He carried a torch and shone it into cars. He regrets it enormously,” she added.
Slack was given a 12 month community order, with a two month curfew, between 8.30pm and 8am. He must also carry out 20 days of a rehabilitation activity.
He must also pay £85 court costs and £106 compensation.