Season 6, Episode 1: "Game On, Charles"
It was a bad idea to go against Charles. After they escape the dungeon, he leaves the girls outside in the rain overnight with nothing but an electrical fence to keep them put. They're finally let back in, and Charles grabs Mona while the other four pass out from some sort of gas. Spencer, Hanna, Aria, and Emily wake up in a morgue-like room draped in white cloths with no clothes. Mona, still playing Alison, brings them medicine and juice, and then it's time for each Liar to go back in their rooms.
We don't learn right away what happens in those rooms, but the girls are clearly scarred from the experience once they're released. We find out during flashbacks that the torture includes forcing them to choose which of their friends to shock and deciding who gets food or water that day.
As the girls are looking through the real Alison's things that were brought to the dollhouse, in anticipation for her arrival, aka kidnapping, Spencer sees "CD" carved into some of her toys. She puts it all together that Charles is a DiLaurentis. While this is going on, Mona is being kept in a deep, dark hole with nothing but the clothes on her back.
Meanwhile, the girls' significant others have been working with the police to prove their innocence in Mona's disappearance, and the officers are hot on their trail. Spencer realizes there must be a secret door somewhere, which would explain how Charles moves throughout the dollhouse quickly. They work together, and Emily finds the path. Just as the dollhouse is going up in flames, the girls rescue Mona from the hole, escape to the outdoors, and find their loved ones with police. They're safe . . . for now.