I don't think it's spoilering anything to say that the Shae bit played out slightly differently in the books to the TV show.
In the TV show, Tyrion (for her own good and to save her) told her to f**k off and that he was married to Sansa. Whereas in the books there was no animosity, which meant that, for me anyway, Shae's appearance at the trial in the books was much more of a betrayal, whereas in the TV show it could be argued that she's just getting revenge.