The Magpies have announced midfielder Shelvey, 28, and winger Ritchie, 30, will remain at St. James’ Park until the summer of 2023.
Shelvey told NUFC TV: “It feels like a home. The people here, ever since I came to the club, have made me feel so welcome.
“‘I’ve had some good times and some bad times here, but it’s mainly good and it’s just an enjoyable place to come in and work – and the city in general has been really good for me.'”
Ritchie added: “Since I came to the club, it’s been a successful period and one that I want to continue being involved in. Hopefully I can be part of the future.”
Shelvey, Newcastle’s leading scorer in the Premier League this season with five goals, has made 130 appearances for the club in all competitions since joining from Swansea for a reported fee of £12million in January 2016.
He has made six senior appearances for England after making his debut against San Marino in October 2012.
Scotland winger Ritchie also signed for the Magpies for a reported £12m, in the summer of 2016, and has scored 22 goals in 139 appearances in all competitions.
Shelvey had been looking to leave Newcastle when Steve Bruce arrived, but since the summer he has become an increasingly important member of the squad once again.
It is believed three rivals have approached Newcastle, including West Ham – but The Magpies told those looking to land Shelvey, that he was no longer available for a move.