I agree with sakeslug that Jiuzhaigou, Dali or Lijiang are great places to escape the heat of Shanghai, but for all these destinations you would certainly need more time than just three or four days. You would spend most of the time getting there and back to Shanghai.
So I think you should go somewhere closer to Shanghai.
Huangshan is one of the most beautiful mountains of China and not far from Shanghai in Anhui province. It reminds you of these old chinese paintings with old pine trees on steep cliffs. And on the mountain it should be a little bit cooler than in damp Shanghai.
Another option would be the island Putuoshan. It has a holy buddhist mountain in the middle of the island with monasteries and temples all over. Putuoshan is off the coast of Zhejiang province and can be easily reached by an overnight boat trip from Shanghai. And if you like seafood you're in paradise there.
Both places are absolutely safe for a single woman to travel to.