Answer:
Riku is only playable towards the end of Kingdom Hearts II, for a short period of time. During the final boss battle against Xemnas, Sora is captured and Riku must stop Xemnas from destroying him. It's only a brief sequence and is nothing permanent.