Reece Burke ended Shrewsbury's hopes of an FA Cup upset as his extra-time winner edged West Ham into the fourth round.
After a goalless draw last weekend, Shrewsbury of League One held off their Premier League opposition again in normal time at the London Stadium, before Burke finally broke the deadlock in the 112th minute.
His emphatic strike, cannoning in off the crossbar, sealed an unspectacular 1-0 victory for West Ham, who will now await the winner of Bournemouth or Wigan, who play their own replay on Wednesday.
Shrewsbury had their chances, most notably through Stefan Payne's missed one-on-one with Joe Hart in the second half of normal time, but fatigue took its toll and they were playing for penalties by the end.