I need to build a widget that clients can put on their website.

It will callback to my database and collect their star rating and update a vector graphic depending on their given rating at any time.

I'm not sure where to start.

Do I need a web service and javascript for this?

Any help with regard to the technologies I should employ would be very helpful.

Thanks in advance.

A web-service call can get the data, but the website itself will need to pass that data to the engine that creates the graphic.