Is it the engine that shakes or vibrates?
What do you mean by shaking? Does the front end wobble around when you are driving or something?
If it's the engine check out the motor mounts.
Does the idle speed fluctuate at idle?
2008 BMW 335i Coupe