Episode seven: Out Of Gas
The episode is shown majoritarily through flashbacks.
It begins with a very empty looking ship except for a very weakened looking captain. The story is a part of the ship got damaged and they didn't have enough time to fix it or to get to a planet or spaceport.
Through the flashbacks we see that Kaylee joined the crew after being found having sex in the engine room with the then ship Engineer. We also see that Jayne was offered a position on the ship after his three man team tracked the ship down and then Mal offered him more money and status that the other two men on his team were offering him.
During all this, Mal struggles to the engine room and finally repairs the ship. He awakes later to find the crew around him explaining how he had saved the day.
Firefly & Serenity