Legal remedies exist for every civil wrong,but have you got time and energy to pursue a court battle.
When you were being shunted around with no clear job being assigned,did you try and find out what is happening??
In hindsight this lack of assigned duty should have been a kind of warning that something is wrong somewhere.
I would in such cases put the experience behind and actively concentrate on looking for a new job as that is more important than any thing else.
Demand one month pay in writing.
Probably you should name such organisations who do not treat employees properly and by casual recruitment cause inconvenience to employees.
This will help other people from joining such difficult companies.