Why did my 2003 Honda Pilot engine just died while i was driving around 30-40 miles per hour?

It virbrates every now and then when i hit 35-40 miles really bad of the whole car and I also have a check engine light and vtm-4 light on. I was able to turn off to a side street put in park and shut off and then started the car back up and it was fine again. Any ideas?

Check your oil level

At the very least, go to an auto parts store and use their OBDII reader to pull the code(s) from the check engine light (CEL). It's a free service and doing so would at least give you a starting point so you're not just blindly guessing at possible causes. If you're not skilled at diagnosing problems given CEL codes and don't know anyone who is that could help you, then I'd advise getting it to a shop at this point.

For safety's sake and your own well being, you don't really want to drive around in a car that has a known stalling problem and you don't want to take guesses as to the fix for it. I wouldn't recommend continuing to drive it until the problem is resolved. You might have a $200 problem right now but if you keep pushing it then it might cause a much more expensive problem to fix or worse yet, the car could stall at an inopportune time and cause a collision and injure you and/or others.