A woman who was trying to send a text message to her husband while her case was being heard was reprimanded by the sitting judge at Naas District Court on May 12.
Sgt Jim Kelly said the woman had the groceries in a pram.
He said she paid for some of the items and the property was recovered.
Judge Desmond Zaidan noted that the woman was texting and asked a garda to take the phone from her.
Barrister Mark Gibbons said she was texting her husband.
He added she has been here for six years and has four children aged under five.
He said she gets €200 per week on social welfare and her husband earns a similar amount delivering leaflets.
He also said the woman is five months pregnant and she was doing it to provide food.
He said the pregnancy might explain her poorly thought out decision. He said she had €200 in court.
The woman has three previous convictions.
Judge Desmond Zaidan said the costs of providing security in stores to combat theft is passed on to consumers.
He said the woman had demonstrated total disrespect for the court and her legal representative.
He imposed an eight months custody term.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.