According to The Huffington Post as reported on Jan. 11, 2013, CBS aired the "Big Bang Theory - The Bakersfield Expedition" episode where the cast costumed themselves in the "Star Trek: The Next Generation" outfits.
To give a brief recap, about 10 miles out towards the Bakersfield Comic-Con, the gang decides to make a stop off at the Vasquez Rocks, which is a familiar movie location for a lot of filming, including "Star Trek". They had figured it would be fun to put on their costumes and get a few shots at the location before arriving at their destination. On their journey, Sheldon Cooper decides to reprogram's his own voice into Leonard's GPS device to provide an "interesting" documentary as they travel. Though Sheldon is no Majel Barret-Roddenberry, his voice does "engage" the audience and Raj, but not so much the rest of the passengers.
The girlfriends make their way to the local comic shop to figure out the big deal about comic books and encounter an environment very alien to them. Penny picks out a "Thor" comic, they all read it, and then discuss the details of the character's abilities.
Examiner.com's writer Jeff Rust gives a rather detailed recap of the episode giving a full ensemble of the quandary the group has gotten themselves into in the middle of the desert and what their girlfriends do while they are away.