1 2 b3 4 5 b6 7 formula for harmonic minor
E F Gb A B Cb D
How do you flatten a C?

in the key of e,would it be?

I personally like to learn shapes. But others, such as the other guitar player in my band like to know where all the notes on the guitar are and which ones they have to play for each scale.
^It's also way more useful.

I advise you to get OUT of the habit of learning shapes exclusively, as it'll only hinder your process as a musician.

You need to be aware of what notes you're playing, why you're playing them, and how you got them.
He who joyfully marches to music in rank and file has already earned my contempt.
He has been given a large brain by mistake, since for him the spinal cord would fully suffice.

Remember: A prudent question is one half of wisdom.