tell that no, you don't cheat. And having your friend come and try to play on my weaknesses and is seriously fucked up. Show your gf the texts and threaten to break up with her over that shit, because if you had chose to fuck her friend it would have been her fault for creating a situation that otherwise wouldn't have existed.
then fuck her friend, and if she finds out tell her you couldn't stop thinking about doing it since that whole thing went down.