Simply hand it to the child, or place it close by.
What does the child do with the bag? Does he pat it, pick it up, poke it, squeeze it?
Discourage the child from biting it. Supervise.
Put a dollop of tempera paint in with the goo. It will mix as the child squeeze the bag.
Create other "goo" substances to put in such bags that might vary slightly in feel. Possibilities include shaving cream and a cooked cornstarch and water mixture.
Put the bag in the refrigerator so you can hand the child a cool bag (nice on hot days).
The child experiences soft viscous textures without any mess, and gains fine motor practice squeezing the bag.