It is against code and all manufacturer recommendations to shingle a roof with less than a 12/2 pitch.
To be clear, I did not say it was a good idea to have a flat roof. As to code, I don't think anyone is going to get upset about a shed, or chicken coop. At least, not where I live.
BTW, you can have a flat roof but you need to use a rubber liner, or those large 3 foot roll shingles. When I had to redo those failed 3-tab shingles, I installed a rubber liner which worked fine.
In any case, I agree a higher pitch for 3-tab shingles is a better plan and should be considered before the build.