Implementation wise, they are actually identical: both declare a named block of example group code that can later be included in any other example group. In fact, they are simply aliases:
Where the difference comes in is in how you include them: `it_behaves_like` (and `it_should_behave_like`, an alias) defines a nested example group, and then eval's the shared group block in that context, where as `include_context` or `include_examples`, eval the block directly in the including context. Generally for shared examples you want the former, but for context sharing you'll want the latter, as the point is explicitly to share the context stuff (before hooks, helper methods, etc).
As for when to use one vs the other: use `shared_examples` when you've got some common examples you want to share. Use `shared_context` when you've got some common context stuff you want to share, such as helper methods, before hooks, etc.
HTH,
Myron