Aww Becks, I'm so sorry to hear things didn't get better, but am glad to hear you've made a decision you feel is right for you
Counselling is good just to sort out the living arrangements, finances etc and to start the process of getting to a point where you are civil for the kids sake. A parenting order is definitely a good idea, it doesn't have to be at the court as far as I'm aware, you can create it with your lawyers and then the court simply seals it (someone correct me if I'm wrong). Like others said, it's a good idea just to get it down in writing what your expectations are of each other, in terms of the boys' care.
If you need anything, just PM me hun. It's been a rough road for you lately, so I hope this turning point is the start of a new, and more content, life for you.