Holly Cotter, 33, of Cei Tir Y Castell, Barry, appeared before Cardiff Crown Court for sentencing.
The court heard that Cotter was concerned in the supply of cocaine, a class A controlled drug, between July 24, 2024, and September 14, 2024.
The offence related to activity linked to an address in Cei Tir Y Castell.
Cotter pleaded guilty to being concerned in the supply of cocaine, contrary to the Misuse of Drugs Act 1971.
Judge Vanessa Francis imposed a prison sentence of 21 months but suspended it for 24 months, meaning Cotter will not go to prison unless further offences are committed or the terms of the order are breached.
The court said the offence was serious enough that only a custodial sentence could be justified.
As part of the sentence, Cotter was ordered to undertake a nine-month non-residential drug rehabilitation requirement under the direction of probation services.
The court also imposed an electronic monitoring requirement. Cotter’s whereabouts will be monitored until April 2027, with conditions attached to her residence and compliance with tagging arrangements.
In addition, she must complete up to 15 days of rehabilitation activity as directed by her supervising officer.
The case was prosecuted by Kathryn Lane, while Harry Baker represented the defence.
