Voyager encounters a very hospitable race known as the Sikarians and the crew are invited to visit their homeworld. Shore leave is organised, and during the visit, Ensign Kim and an alien friend transport themselves to another planet. Kim notices that the planet has two stars and must belong to another star system. The alien describes the location of the planet, and Kim deduces that the teleport device has transported them 40,000 light-years across the Delta Quadrant.
Captain Janeway is informed, and asks Gath, the leader of the Sikarians, if they could modify their technology for Voyager. Gath states that they are forbidden from sharing technology, by their own version of the Prime Directive. Janeway makes an offer, however: the aliens use the transport technology on Voyager in exchange for Voyager's entire library of literature. This is an offer Gath finds difficult to refuse - although Janeway later discovers that he never intends to accept, but is attempting to convince the crew to stay on his planet indefinitely.
In the mean time, an alien civilian offers to bypass the law and give Voyager the technology anyway, in exchange for the literature. Janeway is unable to authorize this, so Chief of Security Tuvok goes to the surface to make the exchange without Janeway's knowledge or permission. He returns to Voyager with the transport device, and requests that the engineering team, who are also willing to undermine Janeway's authority, do not attempt to use the device until Tuvok has spoken with Janeway.
Unfortunately, the engineering team discover that the technology relies on neutrino emissions from the planet, and as Voyager is about to depart, they activate the device. The attempt fails, the device is destroyed, and it transpires that the device was never compatible with Federation technology.
Tuvok and the engineering team are disciplined by Janeway for undermining her authority, and Voyager continues its journey.