Jack Marshall tried to walk out of the Morrisons store, on Amcott Way, without paying for a trolley containing £213 of goods, but was detained by staff, at 9am on December 16.
The court heard his last offence for dishonesty was in 2007.
Debra Bell, mitigating, said Marshall had previously been misusing heroin.
“He managed to get himself straight and stopped using drugs and found work as a self-employed shop fitter,” she told the court.
Fire crews deployed to ‘large’ blaze in Mansfield – with people evacuated as flames spread to nearby properties
Letter: Unfair that disabled can no longer access water park
Creswell properties evacuated as fire crews tackle field blaze
Large fire in Kirkby may have been a 'deliberate or a careless act'
New council boss reveals ambitious plans for Mansfield
But in July last year his work van and house were destroyed in a blaze, and he “started to drift back into drug use,” she said.
She said: “He took the silly decision to go and commit this shop theft. He was caught straight away. He has not used drugs since December. It was the wake up call he needed.
“He is trying to get himself back on track to work again.”
Marshall, 28, of Ferndale Close, New Ollerton, admitted theft when he appeared at Mansfield Magistrates Court, on Wednesday.
He was fined £80, and was ordered to pay £85 costs and a £30 government surcharge.