Temperature won't cause glass to shatter, but heating will.
This sounds contradictory, but here's the explanation. Glass (especially beakers and flasks) can shatter when heating because heating causes the glass to expand. If the heating is done rapidly and non-uniformly, some areas will expand more than others, putting stress on various areas of the glass. If this stress gets too strong, it can cause the glass to crack or shatter. This is especially troublesome for beakers and flasks because of their thin walls (low resistance to stresses) and large surface areas (making them more susceptible to uneven heating).