The key shift happens when we turn the 1 chord of our first key into the 6 chord of the next key. This works because in the moment we just change a major chord into a minor chord, but functionally we turn the 1 into a 6.
For our lead melody we just need to find a note that guides us into the new key.