Question: what episode does fiona get custody?
Answer: Shameless, Season 3, Episode 7: Fiona testifies in court against Frank to gain custody over the kids.