We've made no real effort to teach Samantha to share or to be giving. She has discovered the joy of sharing and giving on her own, probably just by watching us. Quite often, when she is enjoying a particular food, she'll offer a bite to me or to her dad. In fact, sometimes she excitedly insists that we try the tasty morsel! But sometimes if we ask for a bite she says no, and we respect that too.
It works that way on the playground, too. Sometimes she enjoys sharing her toys and using others' toys, but sometimes she just wants to play with her own stuff and not share it at all. We've taught her how to use her "firm voice" to say no when other children grab or pester her. (She's not very good at distinguishing her "firm voice" from her whines or her screams, but she is working on it!)
When we go grocery shopping, I allow Sam to pick out one item, at four dollars or less. She can pick anything she wants. She's picked candy a few times, but she has also picked scented pinecones, a little cactus in a vase, and Gatorade. Last time we went shopping, she picked out a treat for Toby - Beggin' Strips. I thought that was just so sweet! And when we got home I got a wonderful reminder of the benevolence of rational selfishness when I saw the look on her face as she gave him one of those treats. I think she got more pleasure from it than from any of her other picks. Except for maybe the M&Ms.