Man in critical condition after being shot during a home invasion