If you look for a way to install Composer for the machine which is powered with xampp, then here are the tweaks that you shall do.
Step 1 :
Get the composer
sudo curl -s https://getcomposer.org/installer | /opt/lampp/bin/php
Step 2 :
Make it Global
sudo mv composer.phar /usr/local/bin/composer
Step 3 :
symlink it
ln -s /opt/lampp/bin/php /usr/local/bin/php
And you're done ;)