Hi FES
The itinerary is compliant.
For the purposes of TWOV the itinerary is simply CDG-PVG-AMS.
TIMATIC says onward tickets to a third country. The third country is the Netherlands. And that's where the boarding pass will be issued to when your customer checks in in Shanghai. The boarding pass won't be back to BCN (that will be a separate boarding pass).
Almost all tickets eventually end up back at the point of origin. If AF applied that rule, they'd never allow anyone to use TWOV!
Call Paris AF if you must, they will likely be more knowledgeable on TWOV than AF staff in MAD.