Kirsty Birnie said she agreed to wed Kizito Ugo Nwajeri as her friend Morven Hutcheson was in love with him.
She claims she was told by Nwajeri to “name her price” and was handed thousands in cash inside a Bible.
The 30-year-old tried to get a divorce after seeing a TV programme about people being jailed for sham marriages.
Nwajeri, 31, is on trial at the High Court in Aberdeen, accused of paying Miss Birnie £5000 to marry him in October 2010 so he could extend his student visa.
Miss Birnie said the plan “snowballed” after she took the first payment of £2000. She flew to Nigeria with Nwajeri and Morven, 30.
Birnie says: “They were in love and wanted to be together. His visa was running out.”
Miss Birnie told the court she refused to “lie” in a church in Aberdeen, so she flew to Lagos to marry Nwajeri.
She said she didn’t realise the seriousness of her actions until she watched the show about fake marriages.
She asked Nwajeri for an annulment, but he laughed and refused.
Birnie added: “I went to a solicitor about getting a divorce, but I didn’t have a marriage certificate. They couldn’t do anything.”
Defence counsel Louis Moll said Nwajeri claims he married Birnie because he had fallen in love with her.
Mr Moll said: “He told you on a number of occasions that he loved you.”
Miss Birnie replied: “He did actually, yeah. I have no feelings for him whatsoever. I did it for Morven.”
Nwajeri, of Bolton, denies committing an offence under the Immigration Act. He also denies dealing cocaine in Aberdeen between 2010 and May last year.
Too many lies, don't you think?
The trial continues...