If someone wants to use parts of a code licensed under MS-PL and use it in a commercial product, is that allowed by MS-PL? What are the restrictions.
It's the Microsoft Public License (Ms-PL). Yes, you can pretty much do whatever you want with the code.
https://msdn.microsoft.com/en-us/library/ff648068.aspx
However, do read the conditions. Ones worth noting:
If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
NOTE: the MS-PL appears to be deliberately incompatible with the GPL.