The club triggered the one-year extension on Shaw’s current contract in December, but he would have been a free agent in the summer of 2024.
Shaw, who has made 249 appearances since signing from Southampton in 2014, said: ‘Nine years ago, I signed for this amazing club, and I’m thrilled to be extending my stay.
‘I’ve grown immensely since coming to Manchester all those years ago, both as a person and as a player; I know what is needed to succeed at a club like this.
‘We’re at the beginning of our journey under the manager and his coaching staff.
Shaw has impressed for the Red Devils this season, featuring in 36 of their matches in total
‘We’ve been successful already this season, but we want much more.
There’s a great opportunity to create something special here, and I’m going to give everything to be part of that.’