A 48-year-old man from Oldham stole a charity box belonging to MIND in the town, magistrates heard.
Robert Slicker ran off with the box on 11 September but it was not known how much money the box contained at the time of the theft.
The court gave the 48-year-old, of Cheltenham Street, a 12 weeks jail term, suspended for 12 months, and ordered him to pay £25 compensation.
He was also issued with a Criminal Behaviour Order, banning him from Oldham town centre for the next two years.
He must also pay £85 court costs and a £122 victim surcharge.

Dovestone sergeant heartbreak appeal
Teenager dies after body recovered from Dovestone Reservoir
Oasis Academy Leesbrook students wow audiences with magical production of The Wizard of Oz
Professor Brian Cox launches new partnership to inspire next generation of scientists in Oldham