Selkirk Sheriff Court was told the house in Kenilworth Avenue was untidy and virtually uninhabitable with rubbish scattered across the floors when it was visited on August 3 last year.
Sarah Brack, 27, pleaded guilty to a charge under the Children and Young Persons Scotland Act 1937.
Defence lawyer Ed Hulme said his client was struggling with her mental health at the time.
Sheriff Robert Fife commented: “Without going into the details, they were unpleasant circumstances. She was not coping at the time.”
The Community Pay Back order was imposed as a direct alternative to custody.

