A Padiham thief who stole food worth £30 from Marks and Spencer wanted the haul to sell or swap for street methadone, a court was told.
Burnley magistrates heard how Claire McMillan (34) was stopped at the store's branch in the town and the groceries were recovered.
McMillan, whose solicitor said she had an appalling record, was said to have refused to attend a course run by Inspire (the drug treatment service) and her methadone prescription had been stopped.
The defendant, of Oat Street, admitted theft, last November 8th. She was given a 12-month conditional discharge and was ordered to pay £85 costs and a £20 victim surcharge.
Mark Williams, defending, said McMillan had an appalling record going back many years, but it had slowed considerably. She had been out of trouble since autumn 2014 and had become stable on methadone.
The solicitor continued: "For whatever reason, she didn't have her methadone and found herself struggling to buy street methadone."
Mr Williams said the defendant, who was in receipt of employment support allowance, apologised. He added: "The prescription is now back in place."
District Judge Alexandra Simmonds told McMillan: "You have managed to stay offence-free for almost two years. That is of significance against your background. It's disappointing that you appear before the court again."