Jonathan Daniel Skillern, 34, who gave his address as c/o 24 Bremilham Rise, pleaded guilty to stealing the toothpaste and brandy from Malmesbury Co-op on April 24 when he appeared before magistrates in Swindon on July 12.
He also pleaded guilty to stealing a bottle of vodka at another time on the same day day, also from the Co-op.
The court heard that Skillern, who had been sofa surfing with friends at the time, had been suffering from toothache and had stolen the toothpaste and alcohol to self-medicate.
Probation officer Jackie Reynolds told the magistrates that Skillern was “a bit of a mess”.
At the age of 20 he had fallen out of a tree and had been in constant pain ever since.
His former partner had been an alcoholic and he had drunk her alcohol so that she would not drink it and had developed an alcohol addiction himself.
He suffered from a volatile personality disorder and was on a number of medications for that, and is on a 50ml prescription of methadone for a previous drug habit. He had voluntarily sought help from Turning Point but needed help to find some accommodation, Ms Reynolds said.
Skillern was sentenced to a 12-month community order with a requirement to attend a six-month alcohol treatment course, plus 15 rehabilitation activity days.
He was ordered to pay compensation to the Co-op of £25.27.