Shaqiri started Switzerland’s third and final Group A match, against Turkey in Baku, and provided the second and third strikes in their 3-1 win.
The Liverpool attacker dispatched a brilliant, right-footed curler into the top right corner from 20 yards to follow up an opener from Haris Seferovic in the first half, and then blasted home another emphatic finish midway through the second period.
Irfan Can Kahveci netted a consolation for eliminated Turkey, for whom on-loan Ozan Kabak was an unused substitute.
Elsewhere in the same group, Williams featured for 86 minutes and Wilson was introduced for the last quarter-hour as Wales were beaten 1-0 by Italy in Rome.
Matteo Pessina’s goal shortly before half-time separated the sides at the Stadio Olimpico, where the visitors played with 10 men for 35 minutes after a red card shown to Ethan Ampadu.
The results mean Wales claim second place in the section – behind Italy and ahead of Switzerland on goal difference – to assure qualification for the knockout rounds for Williams and Wilson.
They will face the runners-up in Group B next Saturday in Amsterdam.
Shaqiri, however, must wait to see if Switzerland’s tally of four points is enough to progress as one of the best third-placed finishers in the group stage.