Newcastle are second from bottom in the league table at the moment with 24 points from 28 matches. The Magpies are a point behind 17th-placed Sunderland and have a game in hand.
Former Newcastle manager Keegan believes that Shelvey and Townsend will be key to Rafael Benitez’s side's chances of retaining their Premier League status for next season.
"What might save them is Shelvey and Townsend,” Keegan told The South Wales Evening Post. “They are two players that at least know the league," said the former Liverpool striker.
"Shelvey has been a good player for Swansea and he's someone that's game-ready, he hasn't got to learn what the Premier League is all about. He's been playing in it for years.”
"Townsend is someone who has played for England so can bring top quality,” added the Englishman.
Shelvey joined Newcastle from Premier League rivals Swansea City in the January transfer window.
The former Liverpool midfielder has created 13 chances in seven league appearances for the Magpies so far this season.
Townsend joined Newcastle from Tottenham Hotspur in the January transfer window. The England international winger has scored one goal and created seven chances in three league matches for the Magpies so far this campaign.
Newcastle will return to action on Monday evening when they take on Leicester City away from home at the King Power Stadium in the Premier League.