A recovering heroin addict stole from supermarkets after he became homeless, a court heard.
Lee Martyn Ellis stole lager worth £14.99 from Londis in Mirfield on July 6.
He also stole sherry, cider and mojito mix from Tesco in Batley on July 30.
Ellis, 29, hid the sherry in his trousers, while a woman with him hid other items in her bag.
The duo were stopped by staff when they tried to leave.
Ellis pleaded guilty to two counts of shoplifting at Kirklees Magistrates’ Court on Monday.
The court heard he stole out of desperation because he was homeless after moving to get away from people with whom he used to take drugs.
He told police he sold the lager for £10.
Ellis, of Cemetery Road, Westtown, passed drug tests when arrested, but his solicitor said he had developed a drink problem.
He was given a nine month supervised community order with a six month drug rehabilitation requirement.
Magistrates also told him to pay £14.99 compensation to Londis and £60 victim surcharge.