


This prompts Discord to create some sort of pocket dimension and make the CMC (who were initially bored by some of his initial proposals, such as lion tamers or fire fighters) go through an increasingly weirder sequence of alternate realities featuring things like The Lord of The Rings, 80's style cops shows, and the following. The CMC were still trying to earn their cutie mark and after meeting Discord in the Sweet Apple Orchard they decide to ask him for help, hoping that the spirit of chaos may think up something new "they never would have thought of".

And some time after, Friends Forever #2 managed to do ever better than that. One of the stories places them aboard a very familiar starship. Here the mane six travel through different stories while trying to trap a magical creature on the loose.

The most evident one is found in the main comic, issue #16. That actually there have been multiple references in the MLP to Star Trek. That said, I would like to add something no one else has pointed out. Unless some sort of agreement was made, it would be impossible for either of the shows to incorporate elements of the other in its canon. We are talking about two different shows, with intellectual property rights owned by two separate entities. Obviously as already stated by sebsmith in his answer, the two medias cannot be considered canon to each other.
