Earlier quoted context omitted.
Look at this poll: https://d25d2506sfb94s.cloudfront.net/cumulus_uploads/docume... The voters of all parties support these policies. What is "pandering" in a democracy? The people are xenophobes, they are getting what they want.
I think you're both right, pandering is opposed to leading (and eventually shaping public opinion in a non-nefarious fashion).
And what does shaping in a non-nefarious manner imply? Politicians already give speeches setting out their positions and they do campaigning to try and convince people to vote for them, as part of setting out the menu that is inherent in a democracy. But is this shaping or is it merely offering options?
I don't think there are any non-nefarious ways to "shape" opinion. At most you can argue for your own views and hope the arguments are good.