After being sidelined during rookie minicamp as he recovers from shoulder surgery, 49ers rookie Reuben Foster has been going through certain individual drills during team OTAs this week.

The key for Foster, head coach Kyle Shanahan said Tuesday, is to keep him away from any activity that could result in contact.

"Everything out there he's got to watch," Shanahan said. "We've allowed him to participate in anything that there's no possibility of contact. So if he's doing any of the individual drills and not going against people, then he's able to do anything because he can run and do it all. You've just got to be able to avoid collisions right now. He's trying to stay locked in. I know it's hard for him; he wants to run around out there, but he can't do it. We've got to be smart with it and we can't set him back."

Take a look at Foster participating in drills below (via Joe Fann/49ers.com):

Shanahan says Foster is focusing on the Will position, which could set up an interesting scenario going forward between Foster and Malcolm Smith, whom the 49ers gave a surprisingly big contract ($26.5 million over five years) to in free agency. They could also have to compete for time against NaVorro Bowman, who by all accounts is in good form as he rebounds from an Achilles injury. Shanahan doesn't know at the moment how things will play out at Will, which is the way he wants it.

"I'm not sure, and it's a good problem to have," Shanahan said. "It's something that you actually would like to have at every position. In my opinion there's going to be a very good player who's not out there all the time, and that's not a bad thing. It makes the two guys who are out there go a lot harder and play better, it makes your special teams better and it allows you to survive injuries, which almost always happen."