A toddler died after being given methadone by his mother so she could smoke drugs, a court has heard.
Kelly Emery, 34, from Birmingham, is alleged to have given her two-year-old son the heroin substitute to "knock him out" while she took crack cocaine.
Fenton Hogan died in July 2013, and a post-mortem examination revealed he had ingested methadone at least twice before his death.
Ms Emery, of Cotswold Close, Frankley, denies administering the substance.
The jury at Nottingham Crown Court heard Ms Emery was "a long-standing addict" who led a "chaotic" lifestyle and was prescribed methadone as a heroin substitute in liquid form.
She had previously admitted the manslaughter of her son on the grounds she did not prevent him from accessing the methadone himself, but denied deliberately feed him any.
Opening the case against Ms Emery, Christopher Hotten QC claimed the child would have been unable to open the bottles, which had child-proof tops.
He told Birmingham Crown Court it was not suggested Ms Emery intended to kill or harm her son, but, he said, she wanted to smoke crack cocaine "without interference from a fractious child".
The jury were told two dummies found at Ms Emery's home were contaminated with traces of cocaine.
They also heard evidence of her drug-taking was found throughout the house, including pieces of foil.
Mr Hotten told the court her abilities as a mother were "badly affected" by her heroin addiction.
The court was played a recording of the 999 call, during which Ms Emery was given instructions on how to attempt to revive the toddler.
The trial continues.