Normally shared hosting is not suitable if there is a chance of your application overloading the servers and its resources. Shared hosting only makes sense if you are running a low-end website. Shared hosting providers typically do not let you to install custom features or run cron jobs, whereas you can do that VPS. On both shared and VPS accounts, support is provided for ready-made features. On the other hand, if you have a low end website shared hosting makes sense because these accounts are run on high performance computers, in order to be able to host a large number of websites.
So if you do not have the high end needs of a dedicated server and also you do not want to by fully responsible for a web server, or you have a budget, VPS is an attractive option. When your needs grow, you can always opt for a dedicated server.