Centering and merging two rings together

I need to center an octagonal ring together with an internal spur gear and then join them together in a way that results in the octagonal ring being the outside of the gear. Could anyone give me advice on how to do this?

***EDIT Solved, using the solution in the comments***

Thanks! 

SolidworksParts And Features