Answered by Borut | Oct. 31, 2023 00:52
You will travel covered by 24 hour visa free transit, so you do not need any kind of visa. It is obvious from your explanation that you will fly on separate flights and this is fine and acceptable. So, when you land in Shanghai, you will first approach 24/144 hour visa free transit counter where you will apply for a temporary entry permit. This application comes for free. You will present your flight itinerary and after that, you will be allowed to formally enter China and to perform all the necessary formalities.
You are advised to have all your flight tickets at hand for both British and Chinese authorities because they will want to see your entire itinerary. Also, you do not need anything preliminary but when you approach London check-in, you will declare that you will fly to Bangkok via Shanghai using 24 hour visa free transit scheme and you will also present them with your itinerary. After a short check, you will be allowed to board the plane and proceed with your itinerary.