Bastila Shan is a redeemed villain from Star Wars Knights of The Old Republic at first she is one of the main cast until she became an antagonist.
Born on the planet Talravin to Helena Shan and a treasure hunter, her mother gave her up to the Jedi Order, believing that their lifestyle of travel and exertions was not suitable for her daughter. Shan was found to have an exceptional gift with a Force power known as battle meditation; which increased her allies' morale while demoralizing her enemies. Shan sided with the Jedi Council when the Jedi Knights Revan and Malak rebelled against the Council and joined the Galactic Republic in its war against the invading Mandalorian Neo-Crusaders.
One year after the final battle of the Mandalorian Wars, Revan returned from the Unknown Regions as the new Dark Lord of the Sith, with Malak as his apprentice, at the head of a new Sith Empire. Two years into the Jedi Civil War, Shan was the leader of a Jedi strike team sent to capture Darth Revan and Darth Malak. When her team boarded Revan's vessel, they managed to corner the Dark Lord on the bridge. Before they could engage Revan in combat, Malak, who was separated from his Master during the battle, betrayed Revan by ordering the guns of his flagship Leviathan to fire on Revan's vessel in an attempt to destroy both the Jedi and Revan.
However, Shan survived and managed to use the Force to stabilize Revan, who was near death. This act created a bond between the two and Shan brought the comatose Revan to the Jedi Council. Both the Council and Shan came up with a plan and temporarily erased Revan's memories, reprogramming Revan with an identity of a soldier loyal to the Republic. The Council hoped that Shan, through her bond with Revan, would be able to coerce Revan into revealing the location of the Rakatan space station called the Star Forge, which was now under the new Dark Lord Darth Malak's control.
In the final year of the war, Shan's Republic warship Endar Spire was ambushed and attacked by Malak's fleet above the Outer Rim planet Taris. She managed to flee the ship aboard one of its escape pods, assisted by Republic commander Carth Onasi. Shortly after her pod reached the surface, Shan was captured by a swoop gang known as the Black Vulkars. After Revan and Onasi landed on Taris, they managed to track down and rescue Shan. She, Revan, and their companions teamed up with the Mandalorian Canderous Ordo, managing to steal both the launch codes necessary to escape Taris and the Exchange crime lord Davik Kang's light freighter Ebon Hawk. Shan and her companions escaped during the Sith's bombardment of Taris, and headed to Dantooine, where a Jedi Enclave was located.
After Shan met with the Dantooine Jedi Council, they began retraining Revan in the Jedi ways. After finding a Rakatan Star Map in the burial mounds near the Enclave, the Council tasked Shan, Revan, and their companions with finding the Star Forge. During their travels, Shan watched Revan closely to ensure that he did not fall to the dark side. Shan eventually fell in love with Revan, who, despite his past, was able to remain true to the Jedi Code. After Revan found a fourth Star Map—which was necessary to locate the Star Forge—Shan was captured by Malak and fell to the dark side after a week of torture at her new Sith Master's hands.
However, Revan eventually confronted Shan aboard the Star Forge and she was redeemed from the darkness to which she had succumbed. To prove her reclaimed faith, Shan aided the Republic in the Battle of Rakata Prime through the means of her battle meditation. Revan then vanquished Malak, and the Republic fleet successfully destroyed the Star Forge, routing the Sith forces. Sometime after this, Shan and Revan married, and started a new life together. However, within the next two years, Revan left for the Unknown Regions, seeking to eliminate a hidden Sith threat that Revan had discovered during his time as the Dark Lord. He left all whom he cared for behind, including Shan due to her pregnancy, as he did not wish to put the life of their child at risk. She went on to survive the era of strife that followed the Jedi Civil War.