In order to visit Shanghai you will need at least three days. If you want to go shopping (you should !), you should add a couple more days. If you want to visit the neighboring ancient cities , add one or two days per city.
Some of the destinations that can be visited from Shanghai are: Zhouzhuang, Suzhou, Hangzhou, Wuxi, Huangshan, Yanghzou and Quinjiang River Tide, among many others.