I thikn that your perception that there is a connection between moving the shift lever, and changes in idle speed is innaccurate, and is most likely not related at all.
You porbably have a surging (going up and down) idle, or perhaps just a high idle.
Surging idle is ofthen caused by vacuum leak/s, dirty, sticky IAC, and sometimes a dirty MAF sensor. Could be other things, but those three are good places to start, and are easy, and inexpensive.
Check for vacuum leaks, clean your IAC, and Clean your MAF.
Here in America there is a chain of auto parts stores that will pull diagnostic codes for free as a service. You may call around and see if any in your area do the same.
One other sensor that will cause a high idle is a faulty TPS.
What does the IAC do? How does it work? Ford Fuel Injection » Idle Air Bypass (IAB) Check and clean your IAC Ford Explorer IAC Fix .: Articles Checking for vacuum leaks.
Some of the sensors and some of the actuators either read the amount of vacuum, or use vacuum to move controls, therefore it is important to the proper functioning of the engine that your vacuum system is fully intact. Otherwise one may get codes falsely indicating that there is a problem with a controller/actuator, or a sensor when in reality it is caused by a lack of vacuum.
Look at your rubber vacuum hoses (they are about 1/4 - 3/8 inches in diameter, if they are dry rotted or cracked, replace them. IF they slip on/off of their connectors too easily, they may have stretched out a little bit, cut the ends off, and put them back on.
You may listen for a leak. Sometimes using a cut off piece of garden hose is a good aid to listen with. Sometimes a cardboard tube (like from gift wrapping paper) is helpful. Just remember that whenever you stick your head inside a running engine compartment, that you are not wearing any loose clothing or jewelry that can get caught.
Another suggestion is to use a spray can of carb cleaner and spray around the bottom of the intake manifold, and the base of the throttle body assembly. IF there is a leak, you should hear a change in your engine.
Keep a fire extinguisher handy, or use water instead of carb cleaner (it works, but not as well.) Be aware that if you use water and the wires get wet and it runs worse... your wires may be bad, and the water is allowing them to arc instead of jump the gap of the spark plug.
Another suggestion is: to take a propane torch, turn it on (but don't light it) and move it over the vacuum hoses and connections. The engine RPM's will increase if there is a leak and the propane gets sucked in.
Courtesy of TheOldWizard ford-forums... Don't forget to remind folks to check the PCV valve, hose and grommet !