The basis of treating a group of individuals who form a corporation as a single entity is the rights of the individuals who make up the corporation. In this case, this encompasses the rights of the shareholders, the rights of the corporate officers, the rights of the employees (management and workers.), and the rights of all individuals who choose to trade with that corporation under the terms of the corporate agreement.
The rights of a corporation are not a “privilege” as socialists allege. A corporation is a business enterprise (a collective entity) based on a complex legal contractual framework (based on the principle of individual rights) to deal with the problem of limiting liability regarding enterprises where there is a separation of management and ownership.
The definition of a corporation as “An artificial person or legal entity created by or under the authority of the laws of a state” (Black’s Law Dictionary) is only valid when one understands that the laws of any proper society are based on the principle of rights. The point is that the state has no authority to violate rights.
However, how can you treat a group of producers and traders as a single entity?
The same way one can treat a husband and wife as a single entity, as in a marriage. Or, the same way that one can treat a group of men (gender neutral usage) as a single entity called “society.”
The point to keep in mind is that all laws under capitalism are the application of the principle of individual rights to various circumstances.