In early 2007, I traveled via PVG to Kuala Lumpur. At that time, US Citizens transiting PVG were allowed entry to the city of Shanghai only WITHOUT a visa, providing they had an onward ticket and required travel documents to a third country (not just back to USA), a confirmed hotel reservation and stayed less than 48 hours. I did exactly that and visited Shanghai for my first time. It was well worth it.
It took some convincing of the counter agent at my home airport to give me the boarding pass for the ORD-PVG flight with no visa, but the ORD agent in Flagship Lounge was able to find the obscure provision in her computer and they sent me on my way. At immigration in PVG (coming and going), I had no issues whatsoever.
BEFORE DOING THIS, PLEASE CHECK WITH THE CONSULATE OR EMBASSY TO VERIFY THIS IS STILL THE CASE.