Temperatures in Shanghai reached 40 degrees Celsius on Saturday after a five-day heat wave, the municipal meteorology station said.