Im actually working on a similar project right now. Its a simple web controlled R/C Car. I was in the same boat as you, I originally wanted a wifi shield for my arduino. But I settled on using a raspberry pi hooked up to my mega 2560 via USB. You should look into running the firmata protcol on your arduino. It comes with the Arduino IDE. Just look under File->Examples->Firmata and upload the StandardFirmata to your board.
The next step I took was running a node.js webserver with the firmata and socket.io node packages. I have recently began experimenting with the johnny-five node.js package. Simply because Im a bit of a noob when it comes to node.js programming, and was having issues getting it to work right with just the firmata node package. Johnny-five seems promising and I've had a bit of luck with it, but my code is still in the works. Ill post a link to my github page so you can at least have a reference (motor_test.js and motor_test.html, just keep in mind, its still non working code. I have successfully been able to control a led, but motors are a different story. If i get time today ill post my code to my working LED control through node.js project.
Anyway I know I couldn't provide a completely working solution for you, but I hope this at least gets you going in the right direction. Feel free to email me anytime ([email protected]) I'd love to help more in any way I can.
Here are the references. Just Google them. I cant post more than 2 links.
Install Node.js on RPi(http://joshondesign.com/2013/10/23/noderpi)
My github page (https://github.com/messyfresh/pi_rc)
Firmata
Node.js (I found the best version to use with socket.io and firmata is 0.8.2x)
Socket.io
Node.js Firmata
Johnny-Five Node.js