You can use regular quoting operators in a here document:
$ cat <<HERE
> foo \$(bar)
> HERE
foo $(bar)
or you can disable expansion in the entire here document by quoting or escaping the here-doc delimiter:
$ cat <<'HERE' # note single quotes
> foo $(bar)
> HERE
foo $(bar)
It doesn't matter whether you use single or double quotes or a backslash escape (<<\HERE
); they all have the same effect.