In Game of Thrones, Season 4, why did Shae betray Tyrion at his trial?
Did Shae ever love Tyrion, or was he right in thinking that she only loved his gold and the lifestyle he provided?
NOTE: This answer will be strictly about TV show, not the books. In the books things are completely different.
In the Show, Shae indeed loved Tyrion. She proved it when Tyrion suggested that she should flee before Stannis takes over King's Landing. Shae on the other hand rejected his proposal, risking her life, deciding to stay with him till the bitter end. No amount of money can make a person do that.
Shae: Are you afraid, my lion?
Tyrion: If the city falls, Stannis will burn every Lannister he can find. Of course I'm afraid.
Shae: I won't let them hurt you.
Tyrion: I'm a Lannister. I don't have a choice in all this. But it's not your war.
Shae: It is now.
Tyrion: You can't fuck your way out of everything.
Shae: I have so far. Do you remember what you said when you met me in your tent? That I should make love to you like it was your last day on this earth.
Season 2 Episode 9 - Blackwater
Then Tyrion got hideous facial injuries, was stripped off his post as Hand of the King, lost his Gold Cloaks and the Tribesmen. At his most vulnerable position Shae came to see him. She made it clear for him that she didn't care about the Money.
Tyrion: It was good of you to come.
Shae: Good of me? Of course I come. I want to see you.
Tyrion: Believe me, you don't.
Shae: Have you looked? I will be the first.
Shae: You are a mess.
Tyrion: I'm a monster as well as a dwarf. You should charge me double.
Shae: You think I'm here for money?
Tyrion: That was the arrangement we made.I pay you and you lie to me.
Shae: Oh. I'm a poor little rich man and nobody loves me, so I make jokes all the time and pay them to laugh. Fuck your money
Season 2 Episode 10 - Valar Morghulis
She proved it further when she next suggested that Tyrion should flee into exile with her and she was Okay with him being a penniless exile and still wanted to be with him.
Shae: Let's leave.
Shae: Leave King's Landing. They tried to kill you. They will try again. Going into wars, fighting soldiers, you're terrible at this. Let's take a boat to Pentos and never come back. You don't belong here.
Tyrion: What would we do in Pentos?
Shae: Eat, drink, fuck, live.
Tyrion: I want to go with you.
Shae: So do it. Your father, your sister, all these bad people, they can't stop you. Forget about them. Come with me.
Tyrion: I can't. I do belong here. These bad people are what I'm good at. Outtalking them, outthinking them. It's what I am. And I like it. I like it more than anything I've ever done. Are you going to leave?
Shae: You have a shit memory. I am yours and you are mine.
Season 2 Episode 10 - Valar Morghulis
They started drifting apart in Season 3. Shae already suspected that Tyrion found Sansa attractive. Tyrion found the notion absurd. And apparently Shae seemed content with his denials.
But The drift cemented when Sansa and Tyrion were about to be forcibly married. Tyrion wanted to speak to both Sansa and Shae separately but Shae refused to leave and Sansa refused to dismiss her. Tyrion was forced to inform Sansa of his father's plan in front of Shae. He did pass a code worded apology to Shae, but she either didn't understand it or was too furious to consider it. For her, it was Tyrion who betrayed her for a highborn girl.
The significant blow came before Tyrion's marriage. Shae still harbored hopes that Tyrion might choose exile for her but he refused and Shae realized that she always was and always will be just another whore for Tyrion.
Shae: So, am I invited to your wedding?
Tyrion: I didn't ask for this marriage. I didn't want it.
Shae: No? She's a beautiful girl. You said so yourself.
Tyrion: That doesn't mean that, this is duty, not desire.
Shae: Is that what you will tell yourself when you fuck her?
Tyrion: I don't have a choice. My father
Shae: Does not rule the world. We can still go across the Narrow Sea.
Tyrion: What would I do there? Juggle? I am a Lannister of Casterly Rock.
Shae: And I'm Shae the funny whore.
Tyrion: My feelings for you have not changed. I will marry Sansa Stark and do my duty by her.
Shae: While I empty her chamber pot and lick your cock when you're bored?
Tyrion: I swear to you it will not be like that.
Shae: No? What will it be like?
Tyrion: I will buy you a good home somewhere in the city. You will have fine clothes, guards to keep you safe, servants. Any children we might have will be well provided for.
Shae: Children? You think I want children who can never see their father? Who would be killed in their sleep if their grandfather found out about them?
Tyrion: Listen. Listen to me, my lady.
Shae: I'm not your lady.
Tyrion: You are. You'll always be my lady.
Shae: I'm your whore. And when you are tired of fucking me, I will be nothing.
Season 3 Episode 7 - The bear and the maiden fair
Later Varys tried to pay her for leaving, she rejected the bag of diamonds and said if Tyrion wants her to leave, he can bloody well ask her himself.
Shae still harbored hopes and tried to seduce Tyrion at number of occasions, Tyrion always made some excuse, which only deepened the rift.
By that time, Shae's presence had been noted by Cersei. Growing anxious for Shae's safety, given Tywin's threat that he'd hang the next whore he found in Tyrion's bed, Tyrion decided it was time to break up for good and have Shae ferried to safety, whatever the cost. Tyrion was very cruel to her, even though he was just pretending to have her leave King's Landing, but it broke Shae's heart.
Shae: What's wrong, my lion?
Tyrion: Don't call me that.
Shae: What should I call you?
Tyrion: I'm afraid our friendship can't continue.
Shae: Our friendship?
Tyrion: There's a ship waiting in the harbor bound for Pentos.
Tyrion: You'll have your own cabin, of course, and across the Narrow Sea a house, servants.
Shae: What is this?
Tyrion: I'm a married man. My wife has suffered a great deal, as you well know. I don't want her to suffer anymore on my account. I need to uphold my vows.
Shae: She doesn't want you.
Tyrion: I need to do right by her.
Shae: You don't want her.
Tyrion: By our children.
Shae: What are you afraid of?
Tyrion: I'm not afraid.
Shae: You are. You are afraid of your father and your sister. You're going to run from them all your life?
Tyrion: I need you to leave.
Shae: I'm not afraid of them. I'm not going to run.
Shae: We will fight them together. It's like you said, I am yours and you are mine.
Tyrion: You're a whore! Sansa is fit to bear my children and you are not. I can't be in love with a whore. I can't have children with a whore. How many men have you been with?
Shae: How many whores have you been with?
Tyrion: I have enjoyed my time with all of them and I have enjoyed my time with you most of all. But now that time is over. You'll have a comfortable life in Pentos. Bronn will escort you to your ship.
Season 4 Episode 2 - The Lion and the Rose
So that was it, Tyrion confirmed it that for him she was just a whore and everything he said before was a lie and he was now going to enjoy his life with his new wife and sire children on her, which Shae was unfit for. Shae was now going to be what Tyrion thought she was, a whore. So she sold out.
Later, At Tyrion's trial, she scathingly threw it in Tyrion's teeth when he pleaded for her to stop.
Tyrion: Shae. Please don't.
Shae: I am a whore. Remember?
Season 4 Episode 6 - The laws of Gods and Men