The Prime Directive had to at least come up in conversation when first contact with the "Private Little War" natives was discussed. They definitely were a pre warp civilization.
Well to be fair their mission end seemed to be just to study some of the planets for medical reasearch or something and they probably weren't even planing on talking to the locals until they showed up ans shot Spock with guns they weren't supposed to have yet.
It was established that Kirk met Tyree 13 years prior to the episode.
Shooting Spock has nothing to do with establishing first contact with this particular pre-industrial civilization.