Martin Heath was given a community order for theft and possession of drugs when he appeared at Worksop Magistrates’ Court on 14th March.
But after leaving court he went into the nearby Asda supermarket and stole three joints of meat to try and fund his journey home.
Heath, of Lowtown Street, Worksop admitted theft when he appeared before magistrates on Thursday last week.
Prosecutor Kate Beardmore said Heath was seen entering Asda around 1.50pm and putting three joints of meat into a basket.
He then walked out of the store without paying for the items, she said.
She added that Heath told police in an interview that he planned to sell the items.
Defence solicitor David Grant said at the time of the offence Heath was living in Hodthorpe.
“This offence was committed within a couple of hours of him receiving a community order,” he said.
“He then left court and was living in Hodthorpe at the time but had no money to get him back.”
“He made a decision to steal some meat from Asda to sell so he would have money to get back to Hodthorpe.”
Mr Grant added that Heath accepted a custodial sentence was inevitable and after it he wanted a ‘fresh start.’
Magistrates told Heath they had no alternative but to sentence him to 90 days in custody. They revoked his community order.