A pregnant woman said a prayer before stealing a bag of candles from a church, a court heard.
Kelly Ann Jennings (37) was squatting in a house at the time and there was no lighting or heating there. She wanted the candles for light as she was "trying to keep herself safe".
Jennings claimed she put some coins in the church box but accepted she should not have taken the bag of candles.
Judge Anne Watkin ordered a probation report and adjourned sentencing to a date in April.
The defendant, of Bentley House in Dun Laoghaire, admitted stealing a bag of 80 church candles, worth €16.
Dun Laoghaire District Court heard Jennings was caught with the items leaving St Joseph's Church, Berkeley Road, Dublin, on December 23, 2014.
Gardai said CCTV cameras showed that Jennings put some coins in the church box before the theft. Jennings told the court that she "said a prayer" before taking the items.
Defence lawyer Eoin Byrne said Jennings was homeless and living in a squat at the time. She needed light for her own safety.
The defendant's parents were both drug addicts and she previously had a drug problem but has been stabilised for years, her lawyer added. Anthony Flynn, from the Inner City Homelessness group, said "it's not the first time" he had heard of people going to extraordinary lengths to keep warm.
"People are forced to steal sleeping bags from shopping centres so this sort of thing is not uncommon," he said.
"There were a total of 118 rough sleepers in the city on Thursday night and there were no beds available. People are being forced to the limit.
"Homeless sleepers in the city are taking unusual measures to keep warm and they are being forced to steal to survive."
A spokesperson for the Peter McVerry Trust said it was not aware of the incident and that it "was not an issue that has been replicated before".
Father David Donnelly, from St Joseph's Church, said it "was not a great issue".
"I had never heard of such instances before this one and it is certainly not a regular occurrence," he said.
Fr Donnelly said the usual system of donations with coins was still in place before anybody could take a candle to be used.