West Ham advanced to the knockout stages of the Europa League after a 1-0 win against Serbian side Backa Topola on Thursday night.
David Moyes was without several first team regulars due to injury and illness and their absence was felt as the Premier League outfit were well below their best.
But in the 89th minute of a game lacking in overall quality, Soucek arrived at the far post and prodded home Thilo Kehrer's pin-point delivery.
Freiburg's thumping victory over Olympiacos had sent the Hammers down to second in the group, meaning they would require a win against the Bundesliga outfit to qualify as group winners in their final game.