A 48-year-old man caught stealing two yoghurts from the Tesco store in Clitheroe said he had no idea why he had committed the offence.
Blackburn magistrates heard that Michael George Richards had taken prescribed vallium before going out and had little recollection of the incident.
But the court heard he had an extensive previous record for similar offences.
Richards, of Church Brow Gardens, Clitheroe, pleaded guilty to shoplifting. He was made subject of a community supervision for 12 months.
Mr Jonathan Taylor (defending) said Richards did not have a great recollection of what went on.
“He can’t explain why he took the yoghurts,” said Mr Taylor.
“He had plenty of food at home at the time. Normally after taking medication he stays indoors.”