No wait a minute, you may have trouble using the 48-hour visa-free transit clause with this kind of plan. Notice I say "may" not "will." The visa-free transit at China/PVG is intended to allow people on through tickets with international-to-international connection some relief. You will not be on a through ticket--you will have one ticket with a PVG destination and another (one-way) ticket with a PVG start. I think any possible success to do this will be based on being able to link the PNR's and being able to get your boarding pass at airside transfer in PVG, before going to the immigration transit desk. Otherwise, you have two separate tickets with a Chinese domestic destination and then departure, and that my friend, normally means a visa in your passport.
I personally find this a risky proposition. Also, finding a cheap one-way (or throwaway RT) from China to Japan is not necessarily easy to do. You may end up spending more money on this plan than you bargained for.
I'm not clear on what are you trying to accomplish overall? Seeing Shanghai without a visa in 48 hours or less?