Yes, Shah Rukh Khan starred in Ra.One (2011). The previous answer was incorrect. He played a dual role:
Co-stars: Kareena Kapoor Khan (Sonia) and Arjun Rampal (Ra.One, the villain). Directed by Anubhav Sinha. It was India's most expensive film at the time, pioneering heavy VFX and motion capture. A landmark (if polarizing) entry in Indian sci-fi superhero cinema.