Sarah Teehan (23) told gardai that her boyfriend Paul O'Flaherty had put seven kilos of cocaine, valued at €520,000, in her car two days previously because he was worried he would be stopped by gardai.
The following day she decided to move the drugs back into O'Flaherty's car and described to gardai how she had to carry the bag with two hands because it was so heavy.
Judge Katherine Delahunt suspended the last three years of the sentence on strict conditions.
She said that while Teehan was young, she was not foolish and she had been prepared to knowingly store drugs on behalf of her boyfriend. "It was fortunate for you that things came to a head at an early stage," she told Teehan.
Sergeant John Fitzgerald agreed with Sean Gillane, defending, that it had been a large garda investigation "every strand of which related to O'Flaherty" and not his client and that Teehan had no involvement in processing, transporting or holding the drugs.
He also agreed that Teehan met O'Flaherty through her work in a nightclub that he frequented and that she had no association with his criminal activity.
Sgt Fitzgerald accepted that O'Flaherty effectively led a "double life" and had children and a partner that Teehan knew nothing about. She learned about them for the first time during her garda interview.
Teehan of Collins Park, Whitehall, pleaded guilty at Dublin Circuit Criminal Court to possession of cocaine for sale or supply at her home on July 19, 2007. She had no previous convictions and had not come to garda attention since.
O'Flaherty (26) of Iveagh Buildings, Bride Street, who pleaded guilty to possession of the drugs for sale or supply was sentenced to seven years in prison by Judge Patrick McCartan. The last three years of the term were suspended.
Sgt Fitzgerald told Paul Carroll, prosecuting, that O'Flaherty was the target of the garda operation and was arrested in his car on O'Connell Street in July 2007.
A search of the home he shared with his partner revealed the cocaine under a bunk bed.
Gardai then became aware that O'Flaherty had access to Teehan's home and obtained a warrant to search it.
Teehan was not there at the time but came home immediately on request when a small amount of cocaine was found.
Sgt Fitzgerald said that Teehan later made full admissions in relation to the larger haul of cocaine and her confession was the only evidence that connected her to the drugs.
Mr Gillane told Judge Delahunt that his client had started taking cocaine through her relationship with O'Flaherty but asked her to accept that Teehan had "an absolutely spotless record" before and since the incident. He said her actions had brought deep shame on both her and her family.
Mr Gillane asked Judge Delahunt to treat his client as leniently as possible.