Her pupils shrink because the muscles contract.
When the girl opens her eyes in a brightly lit room, the muscles in her iris contract in response to the increased light, which causes her pupils to become smaller (constrict) to limit the amount of light entering the eye and protect the retina from excessive brightness.