Shaqiri, captain of his nation for the last-eight encounter, made it 1-1 in Saint Petersburg with his clinical finish from inside the area with 68 minutes on the clock.
Despite Switzerland then being reduced to 10 men, the game headed to extra-time – where Spain introduced Thiago in place of Pau Torres.
Spot-kicks were required after an additional 30 minutes couldn't separate the two sides, with Luis Enrique's team eventually running out 3-1 winners in the shootout.
"I'm really proud of the team," Shaqiri said post-match. "Penalties are a bit 50-50. I was nervous watching the shootout. I think we just lacked a little bit of luck today."