Michael Sparks, 45, of no fixed abode, appeared at Cardiff Magistrates’ Court over two separate sets of incidents.
Sparks was accused of stealing cooked meats valued at £7.75 from Co-op on Colcot Road on July 1 last year.
The following day, he swiped eight cans of Kronenbourg 1664 – worth £11.78 – from Home Bargains.
The court heard Sparks was also accused of attacking two people in Cardiff on February 25 this year.
Sparks was alleged to have assaulted a man, and also an NHS security guard who was acting in the execution of their duties.
He pleaded guilty to assault by beating of an emergency worker, common assault, and two offences of shoplifting.
Sparks was jailed for a total of 32 weeks.
He must also pay £150 in compensation to the NHS security guard, as well as £11.78 in compensation to Home Bargains and £7.75 to Co-op.
