First you call the store you bought it from and get a refund. Then you contact the manufacturer and let them know. Finally you use it as turtle food.
We have 3 very large dogs in our house and we go through 20-30 pounds of dog food a week. So, when I get a bag that is bad (this is only the second time this has ever happened), I really hate to waste it. Although I don't feel comfortable giving it to my dogs, who probably eat bugs outside anyhow, I figured we would take a little trip on the way to baseball this week. The kids had no idea what I was doing when I asked my son to load up the dog food into the back of the truck. They knew it had to be trashed, but have learned to just go with it. Don't over analyze what mom is doing.
In girl scouts we learned that turtles eat dollar store cat food. In zoology we learned that turtles eat bugs and junk at the bottom of the water. So, why won't they eat dog food? These ones did!
Although it only lasted about 30 minutes, we saw dozens of turtles of all sizes and got to spend some fun time together.