The latest revisions of Visual Studio can be purchased through the regular Microsoft sales channel.
There is also a free version of Visual Studio 2013 and 2015 called Community Edition suitable for Windows Compact 2013. See the licensing terms for use & restriction details.
If you want to buy an older revision of Visual Studio, e.g. VS2008, it is only available as part of Platform Builder or through an MSDN subscription. Please note that not all versions support "Smart Device" development which is required for Windows CE. Normally you need the Professional version or higher.
These products are sold by Microsoft Authorized Embedded Distributors. While you can easily find evaluation versions for download on the Microsoft web pages, it can be tricky to find how to purchase these products.
At the time of writing this article, the steps were as follows:
You may also find it on Amazon or similar distributors.