Make a simple scene file of a sphere or whatever using your shader. Render out a 200 x 200 .iff file and rename it with same name as the shader file but with the suffix, .swatch (e.g., if your shader is called gold.ma, change the swatch name from gold.iff to gold.ma.swatch. Then you just copy this to the .mayaswatches folder directly underneath the folder your shader is in. Sounds a little confusing but is pretty easy.
"Terminat Bora Diem, Terminal Auctor opus."