A young man who stole flowers and wine from a petrol station for Mother's Day had taken pills and alcohol at the time.
Gerry O'Brien's sense of reason was impaired when he became intoxicated, a court heard.
Judge Kathryn Hutton adjourned the case against him to allow him to pay compensation and warned him of probation if he failed to comply.
O'Brien (22), of Coolevin, Ballybrack, admitted theft at Texaco in Templepogue.
Dublin District Court heard he went shoplifting on March 5 last year - Mother's Day eve.
Gda Emma Redmond said that two men went into the petrol station and took two bottles of wine, which they hid in their jackets.
On their way out of the shop they picked up two bunches of flowers and left.
O'Brien was identified on CCTV and was later arrested and charged.
The value of the items came to €54.98 and nothing was recovered. The other culprit was not before the courts.
Gda Redmond said O'Brien had four previous convictions, the most recent of which was for theft. He had also been handed probation for burglary.
O'Brien had been co-operative with the gardai and apologised for the offence.
It was the run-up to Mother's Day and he had been drinking, his barrister Edel Gilligan said.
O'Brien had taken tablets and alcohol, which affected his judgment.
"Due to his intoxicated state, he picked up the wine and the flowers and took them out of the store without paying," she said.
The court heard that O'Brien had two young children and his partner was expecting a third.
He wanted to stay out of trouble by studying horticulture or gardening.
His offending was "not the worst" but it was something he wanted to stop at an early stage.
The court also heard he was willing to pay compensation to the shop.