Toronto Blue Jays Shafer was selected in the eighth round, with the 234th overall selection, of the
2014 Major League Baseball draft by the
Toronto Blue Jays. He was assigned to the
Low–A Vancouver Canadians for the remainder of the 2014 season, and went 1–3 with a 5.16 ERA and 23 strikeouts in 22 innings pitched. He split his time in 2018 between New Hampshire and Buffalo. On August 19, 2018, Shafer was called up by the Blue Jays and made his debut the same day in relief against the
New York Yankees, throwing a scoreless inning with a strikeout. He was outrighted off the roster on November 2, 2018, and assigned to Triple-A Buffalo to start the 2019 season. Shafer had his contract selected on May 28, 2019. He was optioned back to Buffalo on June 3. He ended the season with a record of 2–1 in 34 games. He struck out 39 in innings but also walked 25 batters. Shafer was
designated for assignment on November 20, 2019.
Cincinnati Reds On November 25, 2019, Shafer was traded to the
Cincinnati Reds in exchange for cash considerations. On July 24, 2020, Shafer was designated for assignment by the Reds organization.
Miami Marlins On July 27, 2020, Shafer was claimed off waivers by the
Miami Marlins. On September 9, 2020, Shafer was designated for assignment and released the same day by the Marlins. Shafer allowed no runs with 2 strikeouts in 1.0 inning pitched for the Marlins in 2020.
Kansas City Monarchs On March 8, 2021, Shafer signed with the
Kansas City Monarchs of the
American Association of Professional Baseball. In 5 games for the Monarchs, Shafer recorded a 2–1 record and 5.59 ERA with 26 strikeouts in 19.1 innings pitched. On June 18, 2021, Shafer's contract was purchased by the
Chicago Cubs organization. However, Shafer did not play in a game for the Cubs organization and returned to the Monarchs on July 2. After the 2021 season Shafer would become a free agent. ==Coaching career==