A mother-of-four has been jailed for 20 months for child neglect.
They were often left home alone, often hungry and suffering from head lice and dental problems, Caernarfon Crown Court was told.
The 34-year-old woman, from Denbighshire, cannot be named. The children have now been taken into care.
Judge Merfyn Hughes told her that despite help from various agencies the children were often left unsupervised and in squalor.
One child needed to have 16 teeth removed
, the court was told.
Prosecutor Simon Mills said there had been a large number of flies and an "overwhelming smell" because of open bin bags outside the home and the defendant set fire to rubbish in her garden because of rats.
Elen Owen, defending, said the woman had probably been depressed but did not seek medical help.
"The biggest mistake she made was to take very bad advice from a friend to cope by taking drugs. She took amphetamine which only compounded her problems," she said.
The woman admitted four counts of child neglect involving children no older than 14.
The court heard they were on the child protection register at times and have now been taken into care, with only supervised contact with their mother.
Judge Hughes said the neglect had been protracted over a period of five years
"The children were often left uncared for and unsupervised. They were living in your home in conditions of considerable squalor.
"This is a case where you were unwilling, as well as to a lesser extent unable, to provide adequate care for your children," he added.