By eating the green cones, this squirrel is actually helping the pine tree. How?
Unlike many seeds, the seeds in a pinecone are capable of sprouting long before the pinecone is "ripe". Squirrels often carry the cones up into other trees to eat them (notice the leaves in the photo). This spreads the seeds to new areas, away from the parent tree.