Pittsburgh Pirates pitcher Trevor Williams had a career-best eight strikeouts in a 2-0 shutout of the St. Louis Cardinals.