The former N-Dubz star, 26, allegedly helped to arrange the sale of 13.9g of the Class A drug for £860 to the Sun on Sunday's undercover reporter Mazher Mahmood between 20-24 May 2013.
At Southwark Crown Court on Tuesday, a jury of nine men and three women were sworn in to hear the case, which is expected to last just more than two weeks.
Before they were selected, jurors were asked if they had any connections to The Sun newspaper, The Sun on Sunday or the Sunday Times, or any other News UK enterprise "that would make it difficult for you to be objective and fair" in the case.
The court clerk read the charge and Contostavlos' not guilty plea out to the jurors.
Judge Alistair McCreath warned the jury not to discuss the case with anyone outside the jury room and not to research the case.
He said: "As you may have worked out by now, the defendant is somebody in the public eye.
"She was a professional singer and she had been a judge on the X Factor. She is somebody who is famous.
"The upshot of that is that if you do mention this case to anybody they are bound to say something about what they think."
The jury were sent home for the day and will return on Wednesday morning when prosecutor Tim Cray will open the case.
Contostavlos' friend, rapper Mike GLC, whose real name is Michael Coombs, 36, pleaded guilty to supplying the drugs at a late night rendezvous at the five star Dorchester Hotel in London's Mayfair.