It depends on the type of camera you're talking about. If it's a basic digital camera, buy a new (or used one). If it's an older 33mm camera, take it to a camera shop for an estimate.
To be honest I would just buy a new camera. Viewfinders are one of the biggest parts in the camera and when they are broken it is sometimes hard to find one that will match up with the camera. So buying a new camera would be a safer option or take it to a camera shop.