Ian Hamilton, 42, was caught stealing the goods from a B & M Store in the city of Dundee on Friday afternoon.
Prosecutor Saima Rasheed told Dundee Sheriff Court "He was leaving the store with the items and was stopped shortly after. They were recovered and total value £143.92.
"He said sorry immediately on being restrained. He said it was pure desperation."
He pleaded guilty to shoplifting.
Anika Jethwa, defending, said "He has a bad record- He has been in and out of prison in relation to thefts since 2008. He has longstanding difficulties in his life.
"He didn't have any money to get anything for his children and that's why he committed this offence"
"That's why he said it was desperation."
Hamilton was jailed for four months and ordered to serve a further 30 days of an unexpired portion of a previous prison sentence.