A homeless man who stole dolls in Worksop in order to buy food has been given the chance to turn his life around, a court heard.
Martin Shaw was seen with the £28 toys in B&M Stores on August 28, and when he was challenged, he said: "I don't know what you're on about" and ran off, said prosecutor Donna Fawcett.
She said he had been found with a small amount of "mamba" when police executed a search warrant, in Worksop, on March 13.
He told police he sold the dolls for £5 to buy food, Ms Fawcett said, adding that Shaw tested negative for opiates and cocaine.
Chris Perry, mitigating, said Shaw had kept out of trouble for five years, but lost his job and relapsed into drugs.
He said Shaw had been living "wherever possible" but was due to attend a meeting on Friday which could see him housed providing he engages with drug rehabilitation.
Shaw, 30, of no fixed abode, admitted the offences when he appeared at Mansfield Magistrates Court, on Wednesday.
District judge Jonathan Taaffe said: "There is an opportunity for you to get some stability but it's in your hands.
"I am doing my best Mr Shaw, to help you get back into society.
"Please take the opportunity, because if you don't we will meet again, and inevitably you will end up in custody."
Shaw received a two-year conditional discharge. No costs or surcharges were awarded, but he was ordered to pay compensation to the store.
To read more cases from Mansfield Magistrates Court, click here.