Your check engine light comes on when your car shakes what is wrong?

When the engine light comes on and the car shakes at the same time, it could be the spark plugs or ignition coils are faulty. Misfiring is causing the car to shake.