This it's not very difficult to do, and you don't need necessarily to set a shutter speed so fast (1/4000 or less) if you can accept closing very much diaphragm.
In this photo photo of mines you can see what I'm talking about.
You need to use as a stopped down diaphragm as possible to obtain a background (with the sun in it) correctly exposed, than you'll use a flash (at least) to light your subject, that will be strongly under exposed. The sample photo was taken at 1/250 f16 iso100. The flash was a not too much powerful nikon sb28 speedlight fired with a radio control, inmanual mode, at full power and put as possible near the subject model, to get it's max light. To try and andjust it's more easy than describing all this :) If you want to use bigger apertures of lens diaphragm you can consider using an ND filter on the lens to help too. Or use reflectors and flashes that can be used in 'High Speed Sync' mode to be able to use faster than 1/200 - 1/250 aperture times.