ReSharper is modular. You can write one more module - a plugin - and extend ReSharper with new functionality.
Most of the APIs are public. What ReSharper code uses internally to do its magic is also available to you.
The Plugin Samples page houses a pack of sample ReSharper plugins along with their source code (dubbed "ReSharper PowerToys") for ReSharper RTM versions.
PowerToys for upcoming versions might also be published with the Early Access Program.
The Plugin Integration page explains how Visual Studio, ReSharper and your plugin live together, and when and how the plugin gets loaded and connected to ReSharper.
In short, complex enough ReSharper plugins could be written knowing about ReSharper only, without ever talking to Visual Studio COM APIs and without deploying to Visual Studio.
If a new ReSharper build is installed, it will still load a plugin compiled against an older version - but only if the two-digit ReSharper version does not change.
If the plugin does not call Visual Studio APIs directly, it will also load into any Visual Studio version ReSharper supports.
More at Plugin Versioning page.
For ReSharper to load your plugin at startup, it should be deployed to one of the predefined folders, as listed on the Plugin Deployment page. To update the Visual Studio UI, you should also touch a Registry key to mark it dirty.
The samples page has example installers for each of the PowerToys.