A 13-year-old boy was found living alone for more than four months in squalid and freezing conditions.
The teenager did not have adequate access to food or heating during winter - and was sleeping on a filthy mattress. After he was rescued, it emerged that he was surviving on bowls of cereals.
It was then established that health care worker Michelle Williamson had been allowing the boy to live alone in the property.
Dundee Sheriff Court was told that Williamson, a mum-of-nine, had lost her job as a result of the incident and was now unemployed.
Sheriff John Rafferty ordered her to carry out 165 hours unpaid work and referred her to Scottish Ministers for them to assess her suitability for working with children.
He said: "I consider this to be very serious. It went on from December 2020 until 27 April 2021. During this time, a 13-year-old child was left alone for almost an entire week in a house that was filthy, had inadequate heating and you had to survive on frozen food and carry out meals.
"How someone could allow this to continue for such a lengthy period of time is beyond me."
Williamson, 36, pleaded guilty to wilfully neglecting the boy by leaving him living alone in a cold house, on a filthy mattress on the living room floor and surviving on bowls of cereal.
Police discovered the youngster living on his own in April last year after an anonymous tip-off to Dundee City Council.
The child - who cannot be identified for legal reasons - began occupying the property over the festive period in December 2020.
Despite the conditions the boy was left in, council social workers raised no other concerns about Williamson or the children in her care.
Williamson continued to be employed as a health care assistant by a private firm after her arrest but has been dismissed following her conviction.
Fiscal depute Dev Kapadia told the court: "The accused and her partner had discussions about living together in December 2020.
"The trial period commenced two weeks before Christmas. The complainer felt the house was too crowded and wanted to have his own space.
"Alternative arrangements were made for the child to live at the Kirkton address, on their own, five nights a week.
"A double mattress was in the living room. It was the only room which was heated. [The child] was eating three bowls of cereal a day.
"If [the child] ran low on food, she would arrange for frozen food to be delivered, or the occasional takeaway.
"She would transfer money to [the child's] bank to top up the energy meter. This lasted until April 27.
"Police received a call from child protection from the council, who had received an anonymous call about concerns a child was living alone.
"Police attended the house at 5.40pm. The door was eventually opened by the child, who indicated to them the reason he was home alone was that the accused had gone to the shops.
"The child told them they would contact her by phone, but while talking to the police the child conceded they lived alone because they 'needed space'.
"Williamson would check in on the child once a week but would not stay, they said. Police were concerned about the condition of the house.
"It was in a state of disrepair. It was unclean, dirty, with worktops piled with unwashed bowls and plates which had mould on them.
"There was little food - just a few tins and a packet of pasta. Dirty laundry lay everywhere and a double mattress in the living room had dirty bedding.
"Police noted there was £5 on the meter but no heating on. It was cold and uncomfortable."
Dundee Sheriff Court heard that Williamson, of Kennet Walk, Dundee, spoke to police in June 2021 and told them she was a support worker.
Solicitor Hannah Fairweather, defending, said: "Social work were informed of the situation initially. It was assessed and deemed there were no concerns and they have not been involved since."
Sheriff Rafferty said: "It is extraordinary she was employed as an adult support worker, and more extraordinary she continued as a health care assistant."
Solicitor David Duncan, defending, said: "She displayed a very grave error of judgment. Significant lessons have been learned."