Please see the Developer Zone: Develop Plugins for more information, tutorials and examples on how to Develop plugins for Piwik. You can also learn by browsing our Development blog post series.