1. When I got to the shop, it had closed (произошло раньше).
2. They had eaten (произошло раньше) everything by the time I arrived at the party.
3. When I found my purse, someone had taken the money (произошло раньше) out of it.
4. You had already left (произошло раньше) when the trouble started?