Take a metallic can half filled with water and put it over the flame so that the water inside starts boiling. Now put the lid on the can and remove it from the flame. What happens to the can when we pour cold water on it?
The can contracts
Since the bottle initially had hot water, temperature inside the bottle was high and the particles needed more space. But when cold water is poured on it, temperature decreases and particles need less space. Therefore, the can shrinks.