Yes,
Your iphone will work in Shanghai, If I recall from my last trip the voice was about $1.00 a minute (not including int'l LD if calling outside of China) and data WILL KILL YOU, fortunately I was on a corp data plan at that time and didn't see the bill.
If you will be making calls from China to the US I would recommend getting a prepaid international phone card (NOT SIM, we all know they won't work) that allows you do dial a local Shanghai number, then dial the US using the phone card.
At least this way you'll only be paying roaming charges/airtime for the local Shanghai call, and the Int'l LD will be on the phone card.
Marc