There are several functions that help create and compile effects.
D3DXCreateEffectD3DXCreateEffectCompilerD3DXCreateEffectCompilerFromFileD3DXCreateEffectCompilerFromResourceD3DXCreateEffectFromFileD3DXCreateEffectFromResourceD3DXCreateEffectPool