First, since company did not give you any warning, and you should read your offer letter carefully, find out if they can fire you. In most case, after 3 month, if company want to fire you they have to give you three warnings or you can suit company. Talk to your HR and find out if they can change fire to layoff.
If it is fire and you worked only 5 month, then, it will be better you don't mention this working experience in your resume, so company will not call for reference
If it is fire and you worked only 5 month, then, it will be better you don't mention this working experience in your resume, so company will not call for reference