Hi,
Since the external circuit operates on 12V the voltage at (2) will be 12V when the LED is off, if you connect that to an input of your PIC, which operates from 5V, current will flow from +12V, thru the resistor, LED and into the PIC's input pin, up thru the internal clamp diode and into the 5V supply line of the PIC and the LED will turn on (with less intensity since the total voltage is 7V instead of 12V).

Use a high(ish) value resistor between point 4 and your PIC input (say 47k or something). That will limit the current into the PIC to safe level and stop the LED from glowing.


Same thing with (4) really, if the voltage at (4) is 12V when the button is not pressed and you connect your PIC output (which toggles between 0 and 5V) to (4) it's likely that the external circuit will think the button is pressed no matter if the output is high or low. As you say, a relay or transistor switch should do the trick.