you should check in the according thread on the China Forum, whether you qualify for a TWOV (transit without visa) in Shanghai
http://www.flyertalk.com/forum/china...er-thread.html
in China it is not the case like in other Asian countries, that you can transit through a Airport with any passport from any nationalities.
TG staff (at least Supervisors) in BKK are familiar with TWVO rules and will let you fly if you qualify. Then also checking through bags will not be a problem