1. Place shaders_p.dll and (or if you have linux or mac shaders_p.so) to "mentalray_install_dir"/mentalray/lib (or where your 'MI_LIBRARY_PATH' environment variable point to)
2. Place shaders_p.mi to "mentalray_install_dir"/mentalray/include (or where your 'MI_RAY_INCPATH' environment variable point to)
3. And add these lines to maya.rayrc file:
link "{MAYABASE}/lib/shaders_p.{DSO}"
mi "{MAYABASE}/include/shaders_p.mi"
Warning! (for win only) If you have following error during render:
LINK 0.0 error 191007: cannot load C:\Program Files\Alias\Maya7.0\mentalray\lib/shaders_p.dll, This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
You should install "Microsoft Visual C++ 2005 SP1 Redistributable Package"
You may download it here:
Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)
Microsoft Visual C++ 2005 SP1 Redistributable Package (x64)