  We prove the Casselman-Shalika formula for unramified groups over a
non-archimedean local field by studying the action of the spherical Hecke
algebra on the space of compact spherical Whittaker functions via the twisted
Satake transform. This method provides a conceptual explanation of the
appearance of characters of a dual group in the Casselman-Shalika formula.
