Here's a story I found from years ago that I wrote for a school assignment. I actually haven't seen any of the Star Wars movies, so sorry if my representation of Han Solo is inaccurate.
Captain James T. Kirk sat in his command chair staring into the viewing screen. Stars whizzed by as the U.S.S. Enterprise cruised through space at Warp 3. The ship had been assigned to monitor the area, because there had been some reports of Klingon activity in the neighborhood. The reports were unfounded, but Starfleet still thought it better to assign a vessel there just in case. Never can be too cautious with Klingons.
Mr. Spock looked into his science viewer. He spent a minute gazing into it and then lifted his head abruptly, looking at the scree, and lowered it again into the viewer. Moments later, he cleared his throat and looked at Kirk.
"Captain," he began, "there is evidence of an ion storm ahead of us. It is the largest one ever recorded, and spans in both directions as far as we have authority to travel on our mission."
"Recommendations, Mr. Spock?" Kirk asked. He sat forward and clasped his hands in front of him.
"You know as well as I do, Captain," Spock said, that we were given orders to patrol this whole area. No qualifications were given for ions storms. In fact, this ion storm, due to its size is rather paranormal. While it is theoretically possible for an ion storm to cover this much space, it has never been known to happen."
"You have a theory then?" Kirk queried.
"I hesitate to call it a theory, or even an hypothesis," Spock hedged.
"To put it in human terms, a hunch?" Kirk grinned.
"That would be close," Spock conceded. "It is possible that the Klingons have artificially created this ion storm to conceal their presence here."
"So you recommend we brave the ion storm, and see what's on the other side?" Kirk asked.
"That would seem to be the only proverbial door left open to us by Starfleet."
"Ahead warp factor 4, Mr. Sulu," Kirk said, leaning back into his command chair once more.
"Ahead warp factor 4," Sulu replied. The hum of the bridge continued as usual, and even though they were in the midst of the storm, everything continued as normal.
"Captain," Spock said suddenly, the bewilderment apparent, even in his Vulcan voice. "My scanners are receiving impossible signals."
"What do your scanners say?" Kirk asked.
"If they are correct, we are fast approaching an unheard of phenomenon," he said. "We are approaching a worm hole, which transcends both time and space."
"Another work of the Klingons?"
"I highly doubt that, Captain. I don't believe the Klingons possess that kind of technology that would be necessary to create something of this nature." Kirk nodded.
"My scanners are picking up something else now," Spock stated. "There seems to be a personal vessel coming towards us, with one life form abroad. It's make and model are unknown to the computer banks. I suspect that it came out of the worm hole, from another part of space, from another time. The ship is about ready to fall apart. Shall we try to contact its driver and bring him aboard?"
"Lieutenant Uhura," Kirk said, "contact said vessel, and open up the shuttle bay to take him aboard." For a moment there was silence on the bridge.
"He acknowledges, and has said he'll steer his vessel into our shuttle bay," Uhura said quickly. A moment later she added, "The shuttle bay reports a successful landing."
"Mr. Spock," Kirk said, rising from his chair, "you and I are going to pay a visit to our unexpected guest." Spock rose and they entered the elevator. When they entered the shuttle bay, they found a man looking around the ship, and also examining the damage on his own.
"Hello, sir," Kirk said as they entered. "I am Captain James T. Kirk, of the U.S.S. Enterprise. You are aboard her now. And this is my first officer, Mr. Spock." Spock nodding his acknowledgement to the newcomer.
"My name is Han Solo," the man said. "This is my ship. Something happened, and I was tumbled through space here. I've never navigated these constellations before."
"Where are you from?" Spock asked.
"The Andromeda galaxy." Again, Spock nodded.
"have you noticed any other ships in the area?" Kirk asked.
"Yes, in fact, I have," Han Solo said. He proceeded to give a perfect description of a fleet of Klingon vessels. Spock raised one eyebrow.
"Were you familiar with the area of space that you were sailing in in your own galaxy?" Spock inquired.
"Yes, I was, and nothing like that has ever existed before."
"Perhaps, Captain," Spock said, turning to Kirk, "the Klingons have more advanced technology than I thought."
"Well, we have to get rid of them and their technology. It's dangerous to both galaxies," Kirk said.
"Maybe I can get rid of these Klingons for you," Han Solo suggested. "Does this...thing go back to the same point I left?"
"I believe so," Spock said.
"Then why don't I just divert the Klingons to follow me through their own portal?"
"Would the Klingons be so naive?" Spock asked.
"Perhaps not naive," Kirk said thoughtfully, but maybe proud. If Mr. Solo here can insult their pride, they will follow him to the death no matter where he goes." Han Solo grinned broadly.
"It's a plan then!" he said leaping up. "I'll need my ship fixed, but it doesn't look that bad. I can probably do it myself with a little help from someone aboard here. Would that be acceptable, Captain?"
"Yes, of course," Kirk said. He called Scotty over the intercom. Once the ship was repaired, Han Solo got in it, and awaited the other to fly out. He had been given instructions on what to say to the Klingons so that he could anger them thoroughly enough to make them follow him. The Enterprise had found the Klingon ships even among the ion storm. Then it sent Han Solo out into space where he contacted the Klingons long enough to provide his barrage of insults dramatically. The Enterprise personnel watched the exchange. Han Solo successfully dodged any fire the Klingons sent his way, and the Klingons flew through the worm hole, presumably back to the world of Han Solo.
