If you already have the binary file you can load it in Mathematica by
Install["FLink"]. Now you have a list of
functions you can use from Mathematica.
FInit[path, variables]: starts Fermat with the listed variables as polynomials variables; the variables are submitted as a comma-separated string and should be all lower-case;
FEval[expression]: performs an external evaluation of the expression; both the input and output should be strings;
FClose: closes Fermat; should be always called at the the end of your calculations, otherwise you will end with a process working in background and using CPU time.