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.

Match report: Fleetwood RUFC 38 Oldham RUFC 18
Walker visiting Dove Stone injured
Council leader backs government's new definition of anti-Muslim hostility
Dove Stone Diamond Multi-Terrain Race back