How to import material:
To import the material, you must click File>Append and navigate to the OceanShader.blend file. After this, you must click Material>OceanShader and then click append.
How to add foam:
You must use the "Ocean" modifier to generate foam and make sure "Generate Foam" is checked with "Coverage" set to about 0.500, and turn up "Choppiness" and "Scale" all within the Ocean modifier.
The "Foam Data Layer Name" must be EXACTLY "ocean_foam".
Turn the Resolution to at least 8.