A shoplifter who stole alcohol from a supermarket was caught when staff heard banging in the toilet, where he was pulling security tags off the bottles and drinking them.
John Flynn (51) had been "plagued by alcohol addiction" throughout his life, a court heard.
Judge Ann Ryan put him on a one-year probation bond.
Flynn, of Ferrycarrig Avenue, Coolock, pleaded guilty to theft.
Dublin District Court heard the incident happened at Aldi in Coolock Drive on April 15 this year.
When gardai arrived in response to a reported theft they found the accused held by security staff.
Flynn had been caught taking five bottles of alcohol and hiding them in his jacket.
The court heard the attention of security staff was drawn to the accused because they could hear banging noises coming from the toilet.
Flynn was pulling the security tags off the bottles then drinking them down straight, a garda said.
Three of the bottles Flynn took were recovered and were saleable.
The court heard he had a large number of previous convictions for offences including theft.
His prior convictions were directly related to alcohol but he was clean and sober today, his lawyer said.
The accused had had good bouts but relapsing was a part of his recovery, the judge was told.
"He realises he can't have one bottle, never mind five or six," Flynn's lawyer said.
Judge Ryan told the accused he was very lucky to have the support of his family, which was a "major plus in his life".
She ordered him to enter into a probation bond for 12 months in his own sum of €200.