It is a 93 Pontac Grand Am 3.3 liter engine the engine lopes at idle and runs erratic then backfires and dies
Code 27 is the 2nd gear switch circuit. This does not appear to be the problem.
The ECM uses the gear signals to control fuel delivery and TCC.
If there are not any other codes then check the fuel pressure, if the pressure is low you can get this type of symptom.
Get back to me with more detailed information on your problem so I can help you diagnosis the problem better.