Have a read here How to take flashlight beamshots (with a budget camera)
Couple of things I will add is if you are having trouble with auto-focus place a flashlight close to the target while you are focusing then put it into manual focus.
If you want to compare the beam shots with other lights then you need to use full manual, play with the settings, then when you get it right or near right use the same settings for all of the shots.
Cheers David
ps, do not worry about getting it wrong, that will happen and only costs you a bit of time