The electrical and optical properties of the ZnO nanowires (NWs) have been investigated through back gate field effect transistors (FET) fabricated by photolithographic process and e-beam lithography. The electrical behavior has been characterized by the output and transfer characteristics, and the results show good electron mobility (~100 cm2v-1s-1), relative low concentration (~ 1016 cm-3), high Ion/Ioff ratio (~105), large subthreshold swing slope (0.5 V/dec). Enhanced performance has been observed after rapid thermal annealing at 300 C for 3 minutes and under vacuum conditions, ascribed to the improvement of the surface states caused by the oxygen absorbed species in the surface of the NW. Under white light illumination a maximum sensitivity (Iphoto/Idark) of ~106 is measured below the subthreshold swing region. By other side the oxygen absorbed species effect combined with the photogenerated electron-holes upon ultraviolet (UV) illumination has been used to fabricate UV photodetectors and optoelectronic switches. For first time ZnO NWs have been functionalized with NiO nanoparticles using Ni thermally evaporated and oxidized with oxygen flow at 600 C for 30 minutes, as the SEM and XRD results corroborate. Finally the resistive random-access memory (RRAM) effect has been demonstrates with ZnO NWs using the conductive filament model and the concept of back gate effect has been applied successfully to the RRAM in order to create a high resistance state.