I do it flaccid. I pull my penis and shave the shaft. As for my scrotum, when I shave it is in a relaxed state - but that's mainly because I shave when I take my shower. The warm water relaxes my scrotum.
I get a semi after the process, and I meticulously apply and rub moisturiser on my penis and scrotum after I have shaved. Sometimes I get hard during and after the process, but more often than not, my boy bits relax, I put on my briefs and I then finish dressing.