You can export your ShaderFX material to the following formats: HLSL, GLSL or CgFX. 
- Select the Material node in your ShaderFX editor. 
- In the ShaderfxShader Attribute Editor, under HwShader / Shader Config, select the format that you want to export to from the drop-down list. 
- Under HwShader / Filename, browse to the directory and enter a filename that you want to export the shader file to, and press  . .
- Click HwShader / Save to Disk. 
A shader file is saved to the location that you specified. 
Note: The generated shader files are formatted for use inside Maya. If you're using a file outside of Maya, you may need to adjust its formatting and semantics.