A young man stole a delivery of pizzas from a driver when he arrived to drop them off at a house in west Dublin.
John Tallon (26) was addicted to cocaine and on a three-month "crime spree" when he took the bag of pizzas, a court heard.
Judge Marie Keane jailed him for six months.
Tallon, of Meadowview Grove, Lucan, pleaded guilty to stealing a Domino's Pizza bag and pizzas worth €119.
He also admitted separate burglary, trespass and public order charges.
Dublin District Court heard the pizza incident happened at Sarsfield Close, also in Lucan, last June 7.
A delivery driver arrived at an address at 1am with a bag with pizzas in it. His bag was taken by the accused, who he recognised.
Tallon was arrested and made full admissions. The accused told gardai where to find the bag, which was of significant value. It was recovered, but the pizzas were not.
He also admitted breaking into Guns 'N' Tattoos in Lucan. Nothing was stolen in that incident, but Tallon took tobacco, alcohol and food from Centra, Main Street, Lucan, in a separate theft.
He was caught trespassing on the roof of a shop in Lucan and told gardai to "go f**k themselves" in other incidents.
The offences all happened last year during a "very chaotic" time in the accused's life, his lawyer said.
Tallon worked as a plasterer but became unemployed as a result of being heavily addicted to cocaine and was asked to leave the family home. He fell into a "very dark period".
Tallon was already serving another sentence and his lawyer asked the judge not to add to it. Judge Keane made the six months concurrent.