The veteran defender will join up with the Royals on a free transfer when his contract with the Black Cats expires on July 1.
"John has played and won at the very highest level – he has won five Premier League titles, been part of a European Cup-winning side and earned 118 caps for his country. He will bring us fantastic levels of experience and proven leadership qualities," Reading boss Paul Clement told the club's official website.
"We looked very carefully at John's recent playing statistics and he played a total of 40 games for Sunderland last season; he is still incredibly fit and a hugely motivated individual. So we look forward to him being a big contributor out on the pitch next season."
O'Shea has signed a one-year deal at the Madejski Stadium.