MathOverflow will be down for maintenance for approximately 3 hours, starting Monday evening (06/24/2013) at approximately 9:00 PM Eastern time (UTC-4).

The usual version of collection is the second one in Kaveh's answer. It, with the remaining axioms, won't give the axiom of union. A counterexample is given in the question, except for a slightly unusual definition of $H_\kappa$ for singular $\kappa$; it should be the collection of those sets $x$ such that each member of the transitive closure $TC({x})$ has cardinality $<\kappa$. (This does not imply that the whole $TC({x})$ has cardinality $<\kappa$, which is the usual meaning of $H_\kappa$.)
The usual version of collection is the second one in Kaveh's answer. It, with the remaining axioms, won't give the axiom of union. A counterexample is given in the question, except for a slightly unusual definition of $H_\kappa$ for singular $\kappa$; it should be the collection of those sets $x$ such that each member of the transitive closure $TC({x})$ has cardinality $<\kappa$. (This does not imply that the whole $TC({x})$ has cardinality $<\kappa$, which is the usual meaning of $H_\kappa$.)