Shanghai is the biggest city in China.
South/West towards Hangzhou
Take Metro no. 9 to the station Songjiang Sports Center (7 CNY). Leave through the 3rd exit and you will see the motorway G60. You can either hitch from the toll gate or stand directly on the motorway.
Hitching north towards Beijing
Take Metro Line 2 to Zhongshan Park and then bus number 947 to Jing Hu Gaosu Gonglu (Jing Hu Highway). Once u get to the high way,there is no real place to stand. U can try the highway it self,I preferred hitchhiking in the stop light.
There is a toll road a few km up the road, not sure how to get there, but it seems possible to get there by walking. From the toll road you are on G2 which goes directly to Beijing. Stick to gas stations on the highway, have a note in chinese about who you are and what you are doing,and have a map of China to indicate where they are going,and you will be fine.