If your vehicle is shaking with the check engine light on when the vehicle is idling it means that the engine is misfiring either in one or more cylinders and should get the vehicle checked out before it damages the engine.
Misfires in cylinders can cause engine damage if you don't get the problem fixed soon.
Engine misfires can be caused by several different things such as low fuel pressure, bad spark plugs, bad spark plug wires, bad ignition coils etc.
You can take the vehicle to places such as Autozone and they'll plug the tool into the vehicles computer system and see why the check engine light is on.