Speaker Amplifier for First Alert Keypad
It's no big surprise your circuit is oscillating since you haven't bypassed the amp at all.  At the very least, put a 10 &micro;F ceramic cap as close as possible across the power leads of the amplifier IC.  It wouldn't be a bad idea to put a 100 &micro;F or more electrolytic across the 12 V where it enters your board.

The reason you are seeing oscillation is because the power supply has way too much impedance at the oscillating frequency, and certainly other freuquencies.  Generally you can't count on reasonable AC impedance of a power supply coming from elsewhere via some wires.  Fix that with local capacitors.