Alun Birrell, 41, pleaded guilty to possessing more than 100 grams of cannabis resin and 11 grams of marijuana.
Livingston Sheriff Court was told that Birrell had co-operated with police after they found him with the resin in an Asda car park in Livingston. He went back to his home in Polbeth with them, where a search uncovered the herbal cannabis.
Safeena Rashid, prosecuting, said the drugs had a street value of £370. Sheriff Derek O’Carroll put Birrell on supervision for 12 months and ordered him to do 80 hours of unpaid work.