Below is a simple code snippet that you can wrap in a site scoped feature to publish and subscribe to content types from a content type hub.
As a precaution, please be careful to use this code snippet in production unless you have thoroughly tested it.
Why do we need it?
This is very useful when you are provisioning a site using a web template. This code, wrapped in a site scoped feature will push the published content types from the hub to the new site. You don’t have to wait and guess when the content types will be available in the newly provisioned site.