A little odd reasoning here. Looking at points to defend is not very meaningful. The real point is that Fed is currently 1000 points behind. What he needs will depend on what Djokovic does. Playing Shanghai will definitely leave him closer in the race before Basel than not playing Shanghai would.
Well, obviously he can be closer before those tournaments, but he needs to be close after
them... But winning Shanghai and then losing Paris/Basel means cancelling Shanghai out, in which case he could have stayed in Europe and concentrate only on the swing there increasing chances. Federer needs to gain at least 500 points in Basel/Paris for going to Shanghai to have worth it (score more than last year) in the case he wins it, of course. Even so, Djokovic would still have scored 100 more points than him in Asia if he wins Beijing.