Raymond Gary Coombs was charged with offensive behaviour over the incident at Fresh Choice in Barrington, on 6 April.
He appeared in Christchurch District Court this morning.
The 38-year-old was also ordered to pay $150 in court costs.
Judge Raoul Neave said it was hard to imagine a more serious example of offensive behaviour.
Coombs was also sentenced today to 16 months in prison for two driving charges but may be able to serve it as home detention.