Quincy Rufus Digby Hopkins, of Queens Way in Ringwood, pleaded guilty to assault by beating and shoplifting.
Hopkins stole from the Tesco Express in Butlers Lane and assaulted a member of staff shortly before 11pm on June 22.
He was sentenced when he appeared at Southampton Magistrates’ Court on Friday.
READ MORE: Girl, 16, suffers ‘serious injuries’ after bus river crash
Hopkins will be imprisoned for 10 weeks and has to pay £125 in compensation.
A spokesperson for Hampshire police said: “If you are a shop owner or staff member, please continue to report any incidents to us.
“You can do this by calling 101, or by reporting online via the Hampshire & Isle of Wight Constabulary website.
“With your information, we can take action, including arresting and charging suspects and convicting offenders at court.”