Shama was given the chance to show what he could do in a series of trial games towards the end of last season ahead of his impending summer release by the Royals.
He caught the eye of U's boss Chris Wilder, although the 18-year-old will start next term in the club's Under-21 Development squad.
"This is a fantastic opportunity," Shama told Oxford's official website. "I have been made to feel very welcome ever since the trials and am looking forward to pre-season.
"The club are investing in developing young players, the infrastructure with the sports science, Football Squad software and facilities are great and it is an exciting time to be joining."