Using grep with variables

Being new to shell scripting I hope this question isn't too elementary but here goes.

I run a grep statement - grep 'sqr' sqrmodule.par and the grep statement returns correctly the information that I'm looking for. Now I want to take the output from the grep statement and load it into a variable so I tried:

var1=| grep 'sqr' sqrmodule.par
echo $var1

The echo command shows that the variable does not contain the information from the grep command. Anyone know what I'm doing wrong?

thanks

var1=`grep 'sqr' sqrmodule.par`
echo $var1

Thanks! That worked like a charm!