A teenager with a guilty conscience confessed to more than 20 other crimes after his first arrest for theft.
Ashley Webb, 18, told police he was to blame for 14 burglaries and nine attempted burglaries in the last two years – many of them on Halifax homes.
He also admitted interfering with a vehicle as well as three thefts.
None of the more serious offences would ever have been linked to him if he had not confessed, a court heard.
Prosecutor Jayne Beckett told Bradford Crown Court he was arrested after stealing a packet of 20 cigarettes from a shop on November 5 this year.
The cashier knew him and the incident was caught on CCTV.
Webb had also stolen a mobile phone worth £300 the same day, and a Blackberry phone worth £179 from a 14-year-old girl he knew two days earlier.
When he was arrested on November 10 he told officers he had committed two burglaries in Cooper Lane, Queensbury, and an attempted burglary in Woodside, Bradford, the month before.
He admitted those offences at his first appearance at Calderdale Magistrates’ Court earlier this month and was remanded in custody.
He told police about his other crimes in the two days before his sentencing, and asked Judge Peter Benson to take them into consideration.
Stephen Wood, for Webb, said the teen had no previous convictions and had shown an “uncommon level of cooperation”.
He said: “He has unburdened himself on practically every occasion he has had the opportunity to speak to police, about offences they couldn’t have linked to him.
“This demonstrates the genuineness of his remorse and his desire to wipe the slate clean.”
Webb, of no fixed address, was visibly distressed during the hearing.
Judge Benson sentenced him to 12 months in a young offender institution, suspended for two years.
He also ordered him to carry out 240 hours of unpaid work with 12 months’ supervision.
Judge Benson said Webb’s “unusual” level of remorse had persuaded him to suspend what would normally be an immediate jail term.
Warning him to stay out of trouble, he said: “This is a golden opportunity. I hope you are going to take it.”