The method of developing a widget does not differ much from that of developing a regular Magento module. In a few words, a Magento widget is a Magento module that generates admin add-ons, which you can easily insert into CMS pages or CMS blocks with simple actions.
We will start by creating a sample module that provides one simple widget.
The widget called Social Widget Icons outputs a block that includes the AddThis social sharing icons, the same sharing icons that we added in Chapter 6, Making the Theme Socially Ready.
The final frontend result is shown by the following screenshot: