How to bend handlebar to customize it? Here in my country is kind of difficult to get certain types of handlebars, but it is easy to get flat and riser mountain type handlebars and standard types of road drop bars.

So I'm investigating whether it is possible to purposefully bend a straight handlebar to have it in another shape.

Can it be done with common store-bought tools? If not, I can take it to a metal working shop and get it bent there? Will it be safe?

In particular, I'd like to turn straight handlebar into a bullhorn shaped one.

I'd like to have this done on aluminum but i'm not sure whether a finished handlebar can be bent.

A second option is to make the handlebar out of steel pipe that is easily bought locally. However to install it on a bike shims will be needed to make up for the "bulge" that handlebars have in the clamp area.

I have currently configured my bike with a short straight handlebar fit with bar ends and it works pretty well for my purposes, but I'd like to have a rounded curve instead of the sharp angle that the bar and bar ends have.

I currently do not have the means to buy a ready-made bullhorn via internet by myself, but if I had, the hassle of shipping, customs taxes and other annoyances made me wonder if making my own is feasible.
No! Don't do it!

Certainly not with aluminium / alloy bars. Any bending stresses the internal structure of the metal, weakening it. Even in a metalworking shop, I would be doubtful of the safety of the product. I hesitated to say final product because the result could be ... final. For you.

Even with steel bars, I wouldn't do it. With steel bars we used to bend them slightly to have our preferred shape. But the wall thickness of steel bars these days is so low that I would not recommend even slight bending. With such low wall thickness almost no amount annealing or other treatment will restore full strength.

The other thing you mention is using plain pipe. Since it's not high-tensile steel (it'll be plain carbon steel), to be strong enough it will have thick walls and be heavy.