Sheffield Crown Court heard on June 10 how Bobby Renshaw, aged 23, of Burngreave Road, Sheffield, was caught by police with 7.25grammes of the drug outside the B&M store in Doncaster town centre.
Alexander Menary, prosecuting, said officers caught Renshaw with the drugs – which had a street value of £85 - outside B&M in Doncaster town centre on August 16, 2017.
Renshaw denied possessing drugs with intent to supply but he pleaded guilty to the lesser charge of simply possessing drugs which was accepted by the Crown Prosecution Service, according to Mr Menary.
The court heard the case was delayed after the investigating officer was absent with sick leave.
Judge Sarah Wright sentenced Renshaw to a three-month conditional discharge for simply possessing drugs but warned if the defendant commits any offences in the next three-months he will be re-sentenced.