Answer:
When we reached the shop to buy sweets, (Independent) there were none left for us to buy. (Dependent)
Step-by-step explanation:
The independent part of the sentence is entirely dependent on the subject, while the dependent is not.
If it is something that the subject has control of, then it is independent; and if not, then it is dependent.