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 was told Ms Emery, who led a "chaotic" lifestyle, was prescribed methadone as a heroin substitute in liquid form.
Ms Emery, described in court as "a long-standing addict", had previously admitted the manslaughter of her son on the grounds she did not prevent the little boy from accessing the methadone himself, but said she did not deliberately feed him any.
But 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 she wanted to smoke crack cocaine "without interference from a fractious child."
The jury was told two dummies found at Ms Emery's home were contaminated with traces of cocaine.
The trial continues.