Spoiler alert!!!! (don't look if you do not like spoilers)

=== This is how Ruby got the shadow element: Ruby snuck in to Aaron's base, then Aaron caught her. Aaron knew she was powerful, so he turned her bad, when Abigail and Midnight saved her, the shadow element was still in her, so she can use it anytime. ===

(this happens in the last ep of season 1, but Abigail and Midnight saves Ruby in ep 1 season 2)